Introduction

Visual Studio C++ is a program for Windows users that is helpful when developing C++ programs. While there are several features attached to Visual Studio C++, we will let you discover most of them on your own. This short tutorial will help you with the basics required to pass off labs and develop your own code.

Installation

You do not need to install Visual Studio C++ on any lab computers as it is already installed.

To install Visual Studio on your own computer by following the instructions found on the Microsoft website.

Creating a Project

  • Locate Microsoft Visual Studio and start the program, clicking on the C++ Development option.

The Following window should appear. If this window doesn't appear, go to “View” then click on the “Start Page” icon.

  • Click on the “New Project” button to open a New Project.
  • Under the “Visual C++” tab on the left-hand side of the window, select “Win32” then “Win32 Console Application” as shown in the picture above.
  • Type in the name of the project (you'll want to use something to identify your project like “Hello_TA” or “Lab_1” to be able to locate homework assignments etc.). For this example, we'll use “Hello World”, then click “OK”.

The following window should appear:

  • Click the “Next” button,
  • Check the box next to “Empty Project” and click “Finish”.
  • Your project has been created. Now you need to fill it with code. Right-click on the “Source Files” folder, then “Add”>“New Item…”.
  • Select “C++ file (.cpp)”, name your file (like “Hello World”), and click “Add”.

Running Your Project

  • Fill in the project with the code you need (be sure to include the 'system (“pause”);' code to the end of your “main()” function.
  • At the top of the screen, click the green arrow, “Debug”>“Start Debugging” or press F5 to build and run your program.
  • If your code is written without errors, a screen like this will show up. When you press enter, the screen will close, and you can edit your code.
cs-142/visual-studio.txt · Last modified: 2015/01/07 08:51 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0