using microsoft visual studio c++ express 2005 name: dr ju wang ashwin belle course resource:...

16
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: http://www.people.vcu.edu/~jwang3/CMS C245/

Upload: christina-nash

Post on 04-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Using Microsoft Visual Studio C++ Express 2005

Name: Dr Ju Wang

Ashwin BelleCourse Resource:

http://www.people.vcu.edu/~jwang3/CMSC245/

Page 2: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Ensure proper installation of Visual Studio Express

Refer to the Installation guide on the Microsoft website.

Page 3: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

To begin

To Start the Studio Express application;

• Go to start menu All Programs • Select Visual C++ 2005 Express Edition

Page 4: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

The Start Screen

This is the first screen you would see as soon as the application is up and running.

Page 5: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

The concept of projects

A Project or Solution is a set of files that will compile into a single executable (.exe) file.

A project can contain multiple files compiled together.

Projects are mandatory even when they contain only one file.

Page 6: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Creating A Project

To create a new project of your own,

• Select the file tab,• Select New• Click on Project….

Page 7: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Project Options

Select Win32 application on the left tab and give a name to your project in the section below. Select the Create Directory for Solution checkbox. Then Click OK button.

Page 8: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Project Options

Select Application Settings on the left option panel, and select the Empty Project checkbox. Then click the Finish button.

Page 9: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Adding a file to your project.

Go to project, click on Add New Item….

Page 10: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

File Options

Select Code in the left option panel, select C++ File(.cpp) in the right option panelGive a name for the file (like ex1). Then Click Add.

Page 11: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Main Page

Code Area

Debug information area

Solution ExplorerFiles, Folders etc.

Page 12: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Entering A Program

Page 13: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Compiling / Building

Go to the Build Tab and click on Build Solution

Page 14: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Build Errors

To view Specific errors in your program recognised after building select Error List Window in the view tab options.

Page 15: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Build Errors

The Errors and warnings can thus been seen as shown in the bottom Error list window.

Page 16: Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource: jwang3/CMSC245/ jwang3/CMSC245

Running the program

You can also directly build and run the programm without debugging it by selecting the Start without Debugging option in the Debug tab.