Choose File -> New -> Project from the Visual Studio menus. You should get this dialog box. We wish to create a Win32 Console Application Project . Set the location to someplace on your computer and give the project a name, in this case CS447. Click OK. |
|
Go to the Application Settings tab. Make sure Console application and Empty project and selected. Click Finished. For VS 2017 users: 1) Choose File -> New -> Project -> Installed -> Visual C++ and select Empty Project. 2) Choose Project -> Property and open a Configuration Properties panel. Go to Linker -> System and change the Subsystem option to Console. |
Lets add a window to VS to make navigating our project easier.
From the View menu choose Solution Explorer. All windows
in VS08 can be docked or hidden as you'd like so feel free to drag this
new windows to a location that is accessible but does not block your
view of the main source window. The Solution Explorer shows you a tree representing your current solution. Solutions are made of one or more projects, which in turn are composed of one or more files. We currently have one project in our solution, namely CS447. Right click on our project CS447 at solution explorer and choose Add->New Item. We want a C++ source file so choose the Code category and C++ File (.cpp) from the available templates. Enter a name for our source file, main.cpp in our case. The location should already be under the project you've created. Click Add. You should now see a blank source file in the editor titled main.cpp. |
#include
<iostream> |
I'm not going to explain this code as you are expected to have a
working understanding of C++ for this (and all future) tutorials.To run our program from within the VS08 enviroment we simply choose Debug -> Start Without Debugging. You should see this console window appear. Congratulations! You've got your first successful VS project. |