0% found this document useful (0 votes)
53 views8 pages

Lab 01: Getting Started (Microsoft Visual Studio)

This document provides steps for getting started with Microsoft Visual Studio by creating a new C++ project, adding a C++ file, writing and running a simple "Hello World" program. The 12 steps include launching Visual Studio, selecting a Win32 console application project, adding and naming a C++ file, writing "Hello World" code, building and running the program to display the output message. The objective is to familiarize students with creating, compiling and executing a basic C++ program in Visual Studio.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views8 pages

Lab 01: Getting Started (Microsoft Visual Studio)

This document provides steps for getting started with Microsoft Visual Studio by creating a new C++ project, adding a C++ file, writing and running a simple "Hello World" program. The 12 steps include launching Visual Studio, selecting a Win32 console application project, adding and naming a C++ file, writing "Hello World" code, building and running the program to display the output message. The objective is to familiarize students with creating, compiling and executing a basic C++ program in Visual Studio.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

CSL-113: Computer Programming Lab

Semester BS CS – 01 & BS IT - 01

Lab 01: Getting Started ( Microsoft Visual Studio)

Objective(s) :

1. Creating new project in Visual studio


2. Creating Cpp file in Visual studio
3. Compiling the C++ code in Visual studio
4. Execute C++ code in Visual studio

Step 1:

Open “Microsoft Visual Studio” by clicking on “Start Menu” of your Windows or double click “Microsoft Visual
Studio” application with cursor at desktop screen.

Step 2:

Click on “New Project” to create new project as shown in the following screen. After click, you will see the
screen as displayed in step 3.

Department of Computer Sciences 1/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Step 3:

Here, select the “Visual C++” Tag from left side of screen as displayed in following screen. After, click on
Visual C++, select the “Win32 Console Application” as highlighted. At the end, you need to name your project
as sample shown in with name “hello world”.

Step 4:

After the step 3, click on the Next button as shown in following screen.

Department of Computer Sciences 2/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Step 5:

Here, Check in at “Empty Project” and then click on the Finish button as shown in following screen.

Department of Computer Sciences 3/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Step 6:

After clicking on Finish button, your project will be created and you can see your project in the “solution
Explorer” window tag as shown in following screen at the right side. After this process, now you need to click
on “Source file” then click on “add” tag and then click on “Add new item” to create a cpp file for your
project.

Step 7:

When you click on “Add new item”, following screen will be displayed. Here you need to select “C++ File
(.cpp)” as highlighted in following screen and then rename it as sample shown with name “hello.cpp”. after
rename, click on Add button to create a cpp file in your project.

Department of Computer Sciences 4/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Step 8:

After clicking on “Add” button, following screen will be displayed with name Default “Global Scope”. This is
the screen where you can write your C++ programming language Code.

Step 9:

Now write the following C++ sample code in the above page.

Department of Computer Sciences 5/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Step 10:

Now click on “build” tag, and then click on “build solution” option to compile your C++ code.

Step 11:

Department of Computer Sciences 6/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Once the compilation of your code succeeded, then click on “Debug” tag and select option “Start Without
Debugging” to execute your compiled code for displaying output message.

Step 12:

Here, following is the output screen of your code that will be displayed after clicking on “Start without
Debugging” as mentioned in the previous step 11.

Department of Computer Sciences 7/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)
CSL-113: Computer Programming Lab
Semester BS CS – 01 & BS IT - 01

Department of Computer Sciences 8/8 Semester BSCS 01 & BS IT 01


CSL-113: Computer Programming Lab Lab 01: Getting Started (Microsoft Visual Studio)

You might also like