iostream怎么用不了cout,cin 30
#include<iostream>usingnamespacestd;intmain(){cout<<"hello";return0;}这个程序没问题吧,可是为什么老是...
#include<iostream>
using namespace std;
int main()
{
cout<<"hello";
return 0;
}
这个程序没问题吧,可是为什么老是提示有错误
dffsf.obj : error LNK2001: unresolved external symbol "class stlpmtx_std::basic_ostream<char,class stlpmtx_std::char_traits<char> > stlpmtx_std::cout" (?cout@stlpmtx_std@@3V?$basic_ostream@DV?$char_traits@D@stlpmtx_std@@@1@A)
dffsf.obj : error LNK2001: unresolved external symbol "protected: void __thiscall stlpmtx_std::ios_base::_M_throw_failure(void)" (?_M_throw_failure@ios_base@stlpmtx_std@@IAEXXZ)
Debug/dffsf.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
dffsf.exe - 3 error(s), 0 warning(s)
我看了下库函数里有iostream和iostream.h文件。到底是哪里不对呢。 展开
using namespace std;
int main()
{
cout<<"hello";
return 0;
}
这个程序没问题吧,可是为什么老是提示有错误
dffsf.obj : error LNK2001: unresolved external symbol "class stlpmtx_std::basic_ostream<char,class stlpmtx_std::char_traits<char> > stlpmtx_std::cout" (?cout@stlpmtx_std@@3V?$basic_ostream@DV?$char_traits@D@stlpmtx_std@@@1@A)
dffsf.obj : error LNK2001: unresolved external symbol "protected: void __thiscall stlpmtx_std::ios_base::_M_throw_failure(void)" (?_M_throw_failure@ios_base@stlpmtx_std@@IAEXXZ)
Debug/dffsf.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
dffsf.exe - 3 error(s), 0 warning(s)
我看了下库函数里有iostream和iostream.h文件。到底是哪里不对呢。 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询