0% found this document useful (0 votes)
94 views

Visual C++ Express Edition User Guide

This document provides instructions for using Visual C++ Express Edition to create, compile, and debug C++ projects. It describes how to open Visual C++, create an empty C++ project, add source code files, compile and run the project, and debug it using breakpoints, stepping into and over functions, and viewing variable values in the autos window. The steps allow a user to set up a basic C++ development environment and debug a simple "Hello World" style program.

Uploaded by

Dola Krishna
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

Visual C++ Express Edition User Guide

This document provides instructions for using Visual C++ Express Edition to create, compile, and debug C++ projects. It describes how to open Visual C++, create an empty C++ project, add source code files, compile and run the project, and debug it using breakpoints, stepping into and over functions, and viewing variable values in the autos window. The steps allow a user to set up a basic C++ development environment and debug a simple "Hello World" style program.

Uploaded by

Dola Krishna
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Visual C++ Express Edition

User Guide

PurpleLeap Confidential Page 1 of 7


Steps involved

To open the application, Go to Start and select All Programs -> Visual C++ 9.0 Express Edition -> Microsoft
Visual C++ 2008 Express Edition.

The Visual C++ Express Edition screen will appears as below.

To create a new C project, choose New -> Project from the ‘File’ menu. The following screen will appear.

PurpleLeap Confidential Page 2 of 7


Choose the ‘General’ wizard from the Project types tab and Empty Project wizard from the Templates tab.
Provide a Project Name. Choose an existing folder to save the project and click on the OK button. Here the
name is SampleCProject. Now this project will appear in the Solution explorer. When you create a project, a
folder with name Header Files, Resource Files and Source Files will automatically be created as shown below

To add a new file to the newly created project, right click on the Source Files folder and select Add -> New Item.
The below screen will be displayed.

PurpleLeap Confidential Page 3 of 7


Choose ‘Code’ from the ‘Categories’ tab and C++ File(.cpp) from the ‘Templates’ tab. Enter the file name and
click on the Add button. Here the name of the class is ‘Test’.. Now we have created a file named Test.cpp
under the Source Files folder in SampleCProject project.

The Solution explorer will appear as below.

Now you can write your code inside the Test class.

To compile and execute the program, press Ctrl + F5. The below window will appear asking whether to build the
project.

PurpleLeap Confidential Page 4 of 7


Click on Yes and the project will be built. Incase of any compilation errors, the errors will be listed.

If compilation is successful, the output window will be displayed.

PurpleLeap Confidential Page 5 of 7


To debug your application, you can set breakpoints by clicking on the grey column before the code. Break point
stops the execution of a program at that line where it is placed. In the below image, there is a break point in the
first printf statement.

To enter the debug mode, press F5. The program execution stops at the point where there is a breakpoint. In the
below image you can see a yellow arrow on the break point. The statements in main before this breakpoint have
been executed and the execution has stopped at the first printf.

You can see the autos and call stack windows below the source code.

PurpleLeap Confidential Page 6 of 7


Autos window shows the values of all the local variables at that instance.

You can move to the next line by pressing F11 (Step Into). If there is a function call, pressing F11 will help in
debugging the function. If you dont want to debug the function, you can press F10 (Step Over) when there is a
function call.

PurpleLeap Confidential Page 7 of 7

You might also like