Visual Studio Express C/C++ tutorial for a simple text only console application
After installing Visual Studio or Visual Studio Express C++ 2008, start Visual Studio and you should see something similar to the screen below. Note you do not need to install SQL server if asked.
Select File -> New Project and then a CLR console application to setup a basic text only C/C++ project. A console application prints simple text only. Enter helloword for the name and click OK.
It will setup a starting “hello world” C/C++ example project as seen below:
Select Build and then Build Solution to compile the example code. It should compile with no errors as seen below in the lower Output window.
To run the compiled program, select Debug and then Start without Debugging or Start Debugging (to run in debug mode with breakpoints).
When the program runs a command window pops open for text I/O as seen below. When the program ends, the window closes automatically.
It closes so quickly you might miss it, so you might want to set a breakpoint by clicking to the left of the return at the end with the mouse (sets red dot breakpoint) as seen below.
Then if you run with debugging, it will hit the breakpoint and leave the program’s ouput window open so that you can see it.
Note that the yellow arrow appears on the red dot back in the main Visual Studio window below indicating that the breakpoint was encountered.
Hit Debug and Continue to start again after the breakpoint and exit the program.