I am new to Visual Studio and I don\'t know how to compile a .cpp file. I made just a single .cpp file (ctr + n => Visual C++ => C++ file) and I tried to compile it. But in
The problem is, Visual Studio don't really know, what to do with your .cpp file. Is it a program? Try the following:
File | New projectVisual C++ | Win32 | Win32 ProjectConsole applicationEmpty projectPrecompiled headerSDL checksSource files and choose Add | New Item...C++ FileWrite the following inside:
#include
int main(int argc, char * argv[])
{
printf("Hello, world!\n");
return 0;
}
Press F5