|
我按书中的把Stdafx.h修改了,把以下代码写好
// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main(int argc, char* argv[])
{
cout<<"HELLO WORLD"<<endl;
return 0;
}
可最后结果为
Compiling...
test.cpp
H:\VC++\MSDev98\MyProjects\test\test.cpp(8) : error C2065: 'cout' : undeclared identifier
H:\VC++\MSDev98\MyProjects\test\test.cpp(8) : error C2297: '<<' : illegal, right operand has type 'char [12]'
H:\VC++\MSDev98\MyProjects\test\test.cpp(8) : error C2065: 'endl' : undeclared identifier
Error executing cl.exe.
test.obj - 3 error(s), 0 warning(s)
请赐教啊 |
|