Creating projects in Microsoft Visual C++ 

  1. First create a new folder on your hard drive called project1. If you are in the Pace Computer Laboratories, create the folder on the T (for temporary) drive. If you are working on your own computer, use either the C drive or some other fixed drive. Some of the files created by the Microsoft Visual C++ program will be too large to fit on a floppy disk. You will be able to delete these after you are finished.
  2. Next load the Microsoft Visual C++ program. On the first screen, click on the File menu and choose New. If the Project tab at the top of the window is not chosen, click on it now. Fill in the Project name and Location as shown below. If your folder is not on the C drive, make that change. Choose Win32 Console Application, as shown.

 

3. When the window has been set up, click on OK. You should next see the following two windows.

4. Next click on the Project menu. On that menu, choose Add to Project and then New. You should see the following window.

Make sure that the tab marked Files is selected. On the menu, select C++ Source File. Fill in the name of the C++ file. In this example, the name selected is name.

5. You should now see a new window. The cursor will be positioned at the top. This window holds your C++ program. Type in your program. A sample appears in the picture below.

6. Compile the program by clicking on the left icon at the top right of the window (or typing control F7). If you have syntax errors, return to the program and correct them. When you have compiled without errors, build (link) the project by clicking on the next icon to the right (or typing F7). Finally if that works, you can run the program by clicking on the exclamation point icon, !, or by typing control F5. If this is successful, you will see a console window that looks like the one below. 

 

 

7. When you are finished, choose Print from the File menu, and print out a copy of your program. Copy your C++ program (found in the project1/name folder) to a floppy disk. This is to be handed in to your instructor along with the print out.