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

Setting Up C++ Express

This document provides instructions for setting up a C++ project in Visual Studio Express. It involves creating a new project, selecting the project type as Win32 Console Application, choosing an empty project template, and adding an existing C++ file to the project. The instructions then explain how to run the project without debugging. The code in the added file simply prints a welcome message using cout.

Uploaded by

5ch1um2urg
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Setting Up C++ Express

This document provides instructions for setting up a C++ project in Visual Studio Express. It involves creating a new project, selecting the project type as Win32 Console Application, choosing an empty project template, and adding an existing C++ file to the project. The instructions then explain how to run the project without debugging. The code in the added file simply prints a welcome message using cout.

Uploaded by

5ch1um2urg
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Setting up C++ Express

File  New  Project

1
At Project types, select Win 32

At Templates: Visual Studio Installed templates, select Win32 Console Application

Enter Name, Location, Solution Name according to your choice.

Click OK

2
Select Application Settings

Click Next button

3
At Application type: radio button, check Console Application

At Additonal option: box, check Empty project

Click Finish button

4
5
Right click at Resoure File

At the pull down menu, select ADD and then selecto Existing Item

6
Here is my source code
C:\Greg\VCExpress2008\DeitelExamples\Examples_HTProg_CExpressC2008\ch02

You can put your source code anywhere you like, of course.

Click Add button

7
Now observe that Resource Files C++ Welcome.cpp is added to this project.

8
Right click at C++ Welcome.cpp and you will see the source code.

9
To run Debug  Start Without Debugging

Click Yes (ie. This program is not built earlier )

10
The End

Note: The following is the code we just ran.

// Fig. 2.5: Welcome.cpp


// Text-printing program.
#include <iostream> // allows program to output data to the screen

// function main begins program execution


int main()
{
std::cout << "Welcome to Visual C++!\n"; // display message

return 0; // indicate that program ended successfully

} // end function main

11
Tired off typing std::cout?
If so,use this: ….”using namespace std”
// Text-printing program.
#include <iostream> // allows program to output data to the screen

using namespace std; //added this Greg Lee

// function main begins program execution


int main()
{
//std::cout << "Welcome to Visual C++!\n"; // commented out Greg Lee
cout << "Welcome to Visual C++!\n"; // addeed Greg Lee
return 0; // indicate that program ended successfully

} // end function main

12

You might also like