I am trying to write a simple "Hello World" to the console. I created an empty C++ project in Visual C++ 2008, and added this one file:
// main.cpp
using namespace System;
int main ()
{
Console::WriteLine("Hello World");
return 0;
}
I get this error:
Error 1 error C2871: 'System' : a namespace with this name does not exist
I'm able to use the System namespace when I build a Windows Forms application, but not a console application, regardless of whether I use the precompiled headers. What do I need to do to use the System namespace?