A Simple VC++ 6.0 Starter Guide

A few beginner tips to keep in mind:

  1. In order to successfully compile a program in Visual you must have a workspace, project, & source file(this is your code) open
  2. you should be using same workspace(notebook) for CS201
  3. you should create a new project(folder) for each hw i.e. hw1, hw2, etc
  4. you should create a new source file for each individual hw problem i.e. problem1_2, problem1_3
  5. as you learn to use Visual you may find other methods that you prefer, however, for a beginner I suggest the following steps

To Open Visual:

1. click Start button/Programs/MicroSoft Visual Studio6.0/ MicroSoftVisualC++6.0

Creating a WorkSpace:

Note: you only need to do this ONE time for this class, however, you may create other workspaces for other classes/projects or whatever.

  1. click File/New/Workspace tab
  2. change "Location" box to your personnel directory on the z:\ i.e. z:\mike
  3. fill in "workspace name" field, I suggest using CS201
  4. click OK
  5. workspace name should be listed on left side of screen

You have now created a workspace that is saved in your personnel directory. The next time you want to use Visual C++ to write a program you will open this same workspace instead of creating a new one each time.

Creating a Project:

Note: you should create a new project for each hw assignment, not for each hw problem.

  1. workspace should be open
  2. click File/New/Project tab
  3. select "Add to current workspace", Location path should change to your personnel directory where you saved your workspace
  4. fill in "Project Name" i.e. hw1
  5. select "Win32 Console Application" from list on left of box
  6. click OK
  7. click Finish
  8. click OK
  9. project "folder" should be listed under workspace on left side

Creating a Source File from Scratch:

Note: you should create a new source file for each individual hw problem i.e. chp1 problem 1.3

  1. click on + next to project name to expand project file listings
  2. you should see folder for Source, Header, & Resource
  3. click on Source to select the folder
  4. click File/New
  5. verify that "Location" is your personnel directory, should read something like Z:\fsmdc\workspacename\projectname
  6. click on "C++ Source File" to highlight
  7. fill in "File Name", this is name of actual hw problem i.e. 1_3 for problem 1.3
  8. click OK
  9. Source file now open w/ cursor blinking in text area
  10. Notice on left that Source Folder now contains the source file you just created. click on + to see Source files

To Compile and Execute your source code file:

  1. click on Build/Compile or Ctrl+F7
  2. any errors will be reported in bottom window
  3. click on Build/Execute or Ctrl+F5 or ! button
  4. dos shell should pop open with results of program

To Save Output Results:

  1. in dos shell, click on upper left hand corner for drop down menu
  2. select Edit/Mark
  3. cursor now appears as blinking white box
  4. use mouse to drag and highlight text in program window
  5. hit enter key(this makes a copy of the highlighted area)
  6. hit any key again to close output window
  7. return to Source file in Visual which is still open
  8. go to bottom of Source file page
  9. click on Paste button or press Ctrl+V
  10. output should now be copied to source file(need to comment this out)
  11. To Print, click File/Print