编译总出现这样的错误:
------ 已启动生成: 项目: wnn1, 配置: Debug Win32 ------
正在编译...
wnn1.cpp
c:\documents and settings\wn\my documents\visual studio 2005\projects\wnn1\wnn1\wnn1.cpp(6) : error C2871: 'std' : a namespace with this name does not exist
c:\documents and settings\wn\my documents\visual studio 2005\projects\wnn1\wnn1\wnn1.cpp(10) : error C2065: 'cout' : undeclared identifier
c:\documents and settings\wn\my documents\visual studio 2005\projects\wnn1\wnn1\wnn1.cpp(10) : error C2065: 'endl' : undeclared identifier
c:\documents and settings\wn\my documents\visual studio 2005\projects\wnn1\wnn1\wnn1.cpp(11) : error C2065: 'cin' : undeclared identifier
c:\documents and settings\wn\my documents\visual studio 2005\projects\wnn1\wnn1\wnn1.cpp(11) : error C2228: left of '.get' must have class/struct/union
type is ''unknown-type''
生成日志保存在“file://c:\Documents and Settings\wn\My Documents\Visual Studio 2005\Projects\wnn1\wnn1\Debug\BuildLog.htm”
wnn1 - 5 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
----------------------------------------------------------------------------------------------------
代码也很简单就是:#include "stdafx.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout << "hello" << endl;
cin.get();
return 0;
}
-----------------------------------------
请看看是怎么回事?