Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )

Similar presentations


Presentation on theme: "Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )"— Presentation transcript:

1 Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )

2 10/30/2015Visual Studio 20052 Topics ► Before Starting Visual Studio 2005 (VS2005) ► Starting Visual Studio 2005 (VS2005) ► Creating VS2005 Project ► Creating VS2005 Source File ► Saving VS2005 Source File ► Building Source Files to Executable ► Running Program ► Closing VS2005 Project/Solution ► Opening an Existing VS2005 Project/Solution

3 10/30/2015Visual Studio 20053 Before Starting VS2005 For a new project, use Windows Explorer or some other method to create a new folder on a hard drive where your entire solution/project will be stored. Consider using a short descriptive name which will characterize the project. This path will be used in a later step.

4 10/30/2015Visual Studio 20054 Starting VS2005 1. Click the Start button from the Windows taskbar and select All Programs  Microsoft Visual Studio 2005 (Application)  Microsoft Visual Studio 2005 (Executable). [1] 2. A Choose Default Environment Settings window appears. [2] (only first time after VS2005 installation) 3. Choose Visual C++ Development Settings [3] and click Start Visual Studio button. (only first time after VS2005 installation) 4. Visual Studio 2005 starts and a Start Page - Microsoft Visual Studio window appears. [4] ► SnapShots of Starting VS2005 SnapShots of Starting VS2005 SnapShots of Starting VS2005

5 10/30/2015Visual Studio 20055 Creating VS2005 Project 1. From the Start Page - Microsoft Visual Studio window EITHER click on New Project button [1] OR from the File menu, select New  Project... [2] 2. A New Project dialog box appears. [3] 3. From the Project Types: section, select Visual C++, then General. [3] 4. From the Templates: section, select Empty Project icon. [3] Then select the location for the project created before starting VS2005 by clicking the Browse… button at the end of the Location: text box [3], a Project Location dialog box appears. [4]

6 10/30/2015Visual Studio 20056 Creating VS2005 Project (cont’d…) 5. Select the location for the project that was created before starting VS2005 and click Open in the Project Location dialog box. [4] The path selected appears in the Location: text box. [5] 6. Enter a project name in the Name: text box [5] (ex: Test). This will be the name of the executable file. 7. Check box labeled: “Create directory for solution”. [5] Enter a solution name in the Solution Name: text box (ex: sln_Test). [6] Click the OK button. 8. The Solution Explorer window appears with the solution name in the title bar. The solution and project structures appear in the Solution Explorer window. [7] ► SnapShots of Creating VS2005 Project SnapShots of Creating VS2005 Project SnapShots of Creating VS2005 Project

7 10/30/2015 Visual Studio 2005 7 Creating VS2005 Source File 1. In the Solution Explorer window, right click Source Files, then select Add and New Item…. [1] An Add New Item dialog box appears. [2] 2. In the Add New Item dialog box in the Categories: section, select Visual C++ and Code. [2] In the Templates: section, select C++ file (.cpp). [2] In the Name: text box, [2] enter the name of the function (ex: main). [2] Click the Add button. 3. The function name appears in the Solution Explorer window under Source Files and an area opens to enter source code. [3]

8 10/30/2015Visual Studio 20058 Creating VS2005 Source File (cont’d…) 4. Enter source code in the open area. [4] 5. When source code has been entered, select File and Save All to save the source code. [5] 6. Note: For header files, select Header File instead of Source Files in step 1 above and select Header File (.h) instead of C++ File (.cpp) in step 2 above. ► SnapShots of Creating VS2005 Source File SnapShots of Creating VS2005 Source File SnapShots of Creating VS2005 Source File

9 10/30/2015Visual Studio 20059 Building Source Files to Executable 1. From the Build menu, select Rebuild Solution. [1] 2. The results of the compilation are displayed in the Output window. [2] 3. If there are errors indicated, make corrections then continue with step 5 on previous slide. ► SnapShots Of Compiling in VS2005 SnapShots Of Compiling in VS2005 SnapShots Of Compiling in VS2005

10 Running Program 1. From the Debug menu, select Start Without Debugging. [1] 2. A DOS window should open with the program output. [2] After responding to program as directed and viewing the output, press any key to continue. ► To create a new project repeat above steps. ► SnapShots of Running Program SnapShots of Running Program SnapShots of Running Program 10Visual Studio 2005 10/30/2015

11 Visual Studio 200511 Closing VS2005 Project/Solution 1. From the File menu, select Close Solution. [1] 2. Respond to any message that may appear about saving changes. ► The solution/project file structure can be seen in slide [2]. ► SnapShots of Closing Project/Solution SnapShots of Closing Project/Solution SnapShots of Closing Project/Solution

12 10/30/2015Visual Studio 200512 Opening an Existing VS2005 Project/Solution 1. The entire solution folder (ex: sln_Test) can be copied to another folder or device. 2. In VS2005, select Open  Project/Solution… from the File menu. 3. An Open Project dialog box appears. Go to appropriate location of the project and select the appropriate FileName.sln file to open the solution. 4. The ProjectName - Microsoft Visual 2005 window with FileName.cpp tab should appear.


Download ppt "Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )"

Similar presentations


Ads by Google