Download presentation
Presentation is loading. Please wait.
Published byEric Mosley Modified over 9 years ago
1
1 Getting Started with C++
2
2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008
3
3 Start Up Visual Studio 2008 Click
4
4 Visual Studio Projects A project in Visual Studio is a container for all of the files needed to compile, execute, and debug a program. A solution can consist of multiple related projects. Our solutions will only have a single project. So a solution and a project will be essentially equivalent in this course.
5
5 Ready to Create a Project
6
6 Creating a C++ Project in Visual Studio 2008
7
7 Click
8
8 Creating a C++ Project in Visual Studio 2008 Click
9
9 Start with an Empty Project Click
10
10 We Have a Project
11
11 Adding a Source File to the Project
12
12 Adding a Source File to the Project Click
13
13 It's Open in the Editor
14
14 Add the Program Code
15
15 View the Solution Explore r
16
16 Solution Explorer Window
17
17 Compile and Link the Program
18
18 Run the Program Click here to run
19
19 Program "hello.cpp" in Action Press "Enter" to end program and close window.
20
20 Running Without the IDE We can double click here to run the program independently of the IDE. Here is the exe file.
21
Running from the Desktop Drag the hello.exe icon to the desktop. Double click the icon to run the program from the desktop. 21
22
22 Running Without the IDE We can also run the program from the DOS command line. Copy the exe file into a convenient directory (e.g. C ) Open a command window cd to the directory Type the command: hello
23
23 Running from the Command Line
24
24 Deploying the Program The file hello.exe contains everything that is needed to execute the program. To deploy the program to another Windows computer, just copy the file into a convenient folder. Users can run the program from the command line, or can double click the file in the folder. Or can put a shortcut to the file on the desktop.
25
25 Creating a Shortcut
26
26 Running by Double Clicking Move the shortcut to the desktop. Now you can run the program by double clicking the icon.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.