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

Instructions To Start A Program Visual C

This document provides instructions for starting a new C++ project in Visual Studio and creating a simple "Hello World" program. It details how to launch Visual Studio, create an empty project called "MyFirstCProj" saved to C:\Workspace, add a C++ file called "Hello.cpp" containing code to print integers, compile and run the program, and set breakpoints to debug it. The instructions are meant to demonstrate the basic workflow for setting up and running a new C++ project in Visual Studio.

Uploaded by

Vipin Dixit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Instructions To Start A Program Visual C

This document provides instructions for starting a new C++ project in Visual Studio and creating a simple "Hello World" program. It details how to launch Visual Studio, create an empty project called "MyFirstCProj" saved to C:\Workspace, add a C++ file called "Hello.cpp" containing code to print integers, compile and run the program, and set breakpoints to debug it. The instructions are meant to demonstrate the basic workflow for setting up and running a new C++ project in Visual Studio.

Uploaded by

Vipin Dixit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Instructions to start a program visual c++

1. Go to Start and select All Programs -> Visual C++ 9.0 Express Edition -> Microsoft Visual
C++ 2008 Express Edition.
2. Choose New -> Project from the 'File' menu.
3. Choose the project type as 'General' and template as 'Empty Project'. Enter the project name as
'MyFirstCProj' and save it in C:\Workspace.
4. Observe the changes in Solution Explorer.
5. Right click on Source Files folder and select Add -> New Item.
6. Choose the category as 'Code' and template as 'C++ File (.cpp)'. Enter the file name as 'Hello'.
7. Type the below code inside hello.cpp

#include <stdio.h>

void main()
{
   int a = 1;
   printf("%d", a);
   a = a + 1;
   printf("%d", a);
}

8. Press Ctrl + F5 to compile and execute the program.


9. Set a breakpoint in the first print statement.
10. Press F5 and enter the debug mode.
11. Press F11 to move to the next statement.
12. Observe the various debug windows.
13. Create new projects on your own.

You might also like