Building a Single File Without a Project Workspace
Home Page (Projects) | Overviews | How Do I... Topics | NMAKE Reference
You can create a single source file and then build a console program directly from that source file. This method is generally useful only for relatively simple programs.
To build a console program from a single source file
Close any open project workspace.
Create or open a source file in a text editor window.
On the Build menu, click Build.
In the message box, click Yes.
If necessary, give the source file a new name, with an extension for a file that Visual C++ can build, such as .CPP.
If you don't use a valid file extension, Visual C++ does not build anything because it cannot find a type of source file in the project to build.
Click OK.
Visual C++ creates a default project workspace using the base name of the source file as the base name for the project. It uses default settings for a console program for the project configuration and builds the program.