所以,我有这个问题.为什么cout会抛出
error C2065: 'cout' : undeclared identifier
Run Code Online (Sandbox Code Playgroud)
我使用Visual Studio 2012作为IDE,我正在写一个学校项目.除了示例文件,我已经完成了所有工作.所以我试图在屏幕上写一些像这样的东西:
#include "iostream"
#include "stdafx.h"
using namespace std;
int main()
{
cout<<"example";
return 0;
}
Run Code Online (Sandbox Code Playgroud)
所以问题是cout ... printf工作正常,但我想使用cout.
编辑:我已经改变了""到<>但它没有帮助.另外我仅使用此代码示例...这不是整个项目.