Microsoft Visual C++ QuickStart


This document is intended to help you get started programming in C++ using the Microsoft Visual C++ IDE (integrated development environment).

  1. Print out this document.
    This is so you can have the instructions next to you without trying to flip between the web page and the IDE.


  2. Start up the Microsoft Visual C++ IDE.
    IDE locations are listed on the "Current status of programming environments" page, which is off of EECS 280 course home page.


  3. Start a new project.
    Select "New..." from the "File" menu. Select "Win32 Console Application" from the list of project types.


  4. Enter a project location.
    Enter a project location into the "Location:" field. This can be any directory where you have write access, such as "C:\temp\".


  5. Enter a project name.
    Enter a project name into the "Project name:" field. A directory of this name will be created. It will contain contain all of your project-related files. Click on "OK".


  6. Create a source code file for the project.
    Choose "New..." from the "File" menu. Select "C++ Source File" from the list of file types that appear. Type a file name into the "File name:" field. THE FILE NAME MUST END WITH A ".cpp" EXTENSION! Click on "OK". A window with your file name appears, though its title might be hidden by an "Info Viewer" window.


  7. Type in your source code.
    It is a good idea to always type in and execute the following sample code, to make sure everything is working correctly:
    #include <iostream.h>
    
    int main ()
    {
        cout << "Test" << endl;
    }
  8. Run your program.
    Select "Execute <your project name>.exe" from the "Build" menu. This will compile and execute your source code. Be aware that if an error occurs during compilation, and this compile does not produce a new executable file, and an old version of the executable file exists, then MSVC will run that old version of the executable.


  9. Save your work.
    From the "File" menu choose "Save All". MSVC also automatically saves all source files before compiling.
Hint:
If you find yourself using a menu item often, note the hotkey equivalent next to the menu item and use it instead.

S. Houchard 1/15/99
A. Hornof 1/18/99