Compile single C++ file in Visual Studio 2010
12,152
Solution 1
You can follow this guide from MSDN to compile standalone C++ files without an IDE.
Solution 2
In Visual Studio 6.0, you could load up a single CPP file, with a main(), and compile it. Can't remember if this was taken away in Visual Studio 2008 or 2010, but it's gone.
It used to be easy to fire up a new instance, paste in some test code an just run it. Now it takes creating or using a dummy project, as others above have noted.
Not hard, just less handy than before.
Author by
hakuna matata
Updated on June 16, 2022Comments
-
hakuna matata almost 2 years
I want to compile a single file in c++ using Visual Studio 2010. I created a new file, not a project, and wrote some "hello world" code and I want to compile it and run it. How to do so? I've searched here and in Google, I got things like F7 or F5 nothing worked.