请教:为什么我加了个 using namespace std; 编译就不行啊?谢谢!
请教:
建立的是 win32 application 程序
#include "stdafx.h "
#include "iostream.h "
#include "windows.h "
int main(int argc, char* argv[])
{
printf( "Hello World!\n ");
cin.get();
return 0;
}
这样是可以编译的
但是:
#include "stdafx.h "
#include "iostream.h "
#include "windows.h "
using namespace std;
int main(int argc, char* argv[])
{
printf( "Hello World!\n ");
cin.get();
return 0;
}
为什么不行呢?
C:\test\异常处理\异常处理.cpp(9) : error C2871: 'std ' : does not exist or is not a namespace
我要怎么改啊?
谢谢!
[解决办法]
把
#include "iostream.h "
换成
#include <iostream>
[解决办法]
如楼上
改成
#include <iostream>
atl库都是没.h的