How to Create a Project With Microsoft Visual Studio Express 2012

Microsoft Visual Studio Express 2012 is a free IDE that can be used for C++ programming.  This freeware requires registration.  You may download it at http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop.

To create a C++ program, Microsoft Visual Studio Express 2012 requires that you create a project for your program.  This tutorial demonstrates how to create a project.
It demonstrates only how to create a general (non-windows) project.  It does not provide project details beyond the minimum steps required to get started.

This is the Microsoft Visual Studio Express 2012 screen.  To begin, click on the New Project... link.

Express 1

On the New Project project page, select Visual C++ -> General and Empty Project.
Enter a Name and Location for the project.


express2

You should now see the Solution Explorer window on the right side of the Microsoft Visual Studio Express 2012 screen.  In it you'll see the "contents" of your new project.
You now need to add a C++ source file.  Right mouse click on Source Files.

express3

In the first pop-up, select Add.  The select New Item...

express4

Select Visual C++ -> C++ File (.cpp).
Then enter a name for the C++ source file.  Make sure you keep the .cpp extension.  You can also change the file location if you want.

express5

You now see an empty editor.  Here you type in your source code.

express6

Now let's compile the code.  From the menu, select BUILD.  From the BUILD menu, select Build Solution.

expresss7

You should see the results of your build in the Output window below.

express8

Assuming the build was successful, then you can now execute your program.  To do this, click on the DEBUG menu and select Start Without Debugging.

express9

The program output should then flash on the screen, but it will not stay so you can observe it.  This is not an issue in the Microsoft Visual Studio non-Express versions.
To be able to view the program output, you need to "pause" the exection.  To do this, add

system("pause");

to the end of your program.  Then run it again.

express10

Here's your program output.

expess11

Remember to save your program before you exit.