简单问题
//main.cpp
//~
#include "iostream.h"
#include "string.h"
using namespace std;
int main()
{
string user_name;
cin >> user_name;
cout << end
<< user_name;
return 0;
}
编译时出现如下错误:
--------------------Configuration: CIN - Win32 Debug--------------------
Compiling...
CIN.CPP
F:\源代码\c\CIN.CPP(7) : error C2871: 'std' : does not exist or is not a namespace
F:\源代码\c\CIN.CPP(11) : error C2065: 'string' : undeclared identifier
F:\源代码\c\CIN.CPP(11) : error C2146: syntax error : missing ';' before identifier 'user_name'
F:\源代码\c\CIN.CPP(11) : error C2065: 'user_name' : undeclared identifier
F:\源代码\c\CIN.CPP(14) : error C2065: 'end' : undeclared identifier
Error executing cl.exe.
CIN.exe - 5 error(s), 0 warning(s)