Interview Question in Visual Studio 2005
Interview Question :: Question about visual C++ |
Here is the code:
// my first program in C++
#include <iostream>
#include <cstdlib>
#include "stdafx.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout << "Hello World!";
return 0;
}
the error:
1>Compiling...
1>std.cpp
1>c:\users\hong wei\documents\visual studio 2005\projects\ok\ok\std.cpp(6) : error C2871: 'std' : a namespace with this name does not exist
1>c:\users\hong wei\documents\visual studio 2005\projects\ok\ok\std.cpp(10) : error C2065: 'cout' : undeclared identifier
1>Build log was saved at "file://c:\Users\Hong Wei\Documents\Visual Studio 2005\Projects\ok\ok\Debug\BuildLog.htm"
1>ok - 2 error(s), 0 warning(s)
so how to fix it i am using visual c++ express |
|
|
|

Loading ...