V22.0002

Using Visual C++
Click here for a printer friendly version of the Visual C++ instructions


 

Creating a project in Visual C++

1) Select "New" in the file menu:

2) Specify a Project name, and select "Win32 Console Application":


3) Specify "An empty project" and click on ok:


4) Click on "OK"


top


Adding files

1) Select "New" from the file menu:

2a) Hilight "C++ Source File" from the list on the left
2b) Make sure "Add to project" is checked
2c) Give the file a name (Make *sure* it ends with ".c")



3) You're done! The white space on the right hand side of the screen is the space in which you should start coding. :)

 

top


Compiling the project

  • To compile(build) the project, press the F7 key. You can also do this from the "Build" menu, or from a button on the toolbar. Find out how you will do this.

 

top

Running the program(excuting the program)

  • If there are no compilation errors in the Build window at the bottom, you can execute the program by pressing the Ctrl and F5 keys simultaneously.
  • You can also press the red exclamation button on the toolbar, or by selecting Build -> Execute.

top


 

Printing the Output Screen from Visual C++

  1. Run your program. You will automatically be in the output window.
     
  2. When in the output window (the black one), click once on the "MS-DOS" symbol in the upper left-hand corner of the menu bar. You will get a pull-down menu.
     
  3. Under the sub-menu "Edit" select "Mark".
     
  4. The cursor will blink on the upper left-hand corner of the window. "Click" and "drag" to select the text you want to print.
     
  5. Hit the "enter" key (Enter).
     
  6. Start Wordpad.
    (Start->Programs ->Accessories ->Wordpad)
     
  7. Inside Wordpad, use the Paste command.
    (Edit->Paste or <Ctrl>- V)
     
  8. Print from within Wordpad.
    (File->Print)

top


Enlarging print file

  1. Double click on "My Computer" to see the top folder
     
  2. Double click on the folder "Windows"
     
  3. You will get an empty screen with a warning that modifying these files can lead to system problems. You are given an option to show the files by clicking on "show files". Do that to display the contents of the folder.
     
  4. Double click on the folder "System"
     
  5. You will get another message like in step 3. Click on "show files"
     
  6. Look for a file called "conagent" and select it by clicking once (you will probably have two, one with the MS-DOS icon, the other with a blue window icon, they are really the same so you can use either one).
     
  7. Right-click (using the right button on your mouse) on "conagent" and select the "Properties" option.
     
  8. Click on the "Screen" tab.
     
  9. In the first part of the panel, on the right-hand side, select the size to be 50 lines.
     
  10. In the middle section of the panel, unselect "Restore settings on startup".
     
  11. Close the window. From now on, every time you run a program from within Visual C++, you will get a window with 50 lines.


    
    if nothing else works, try:
    
    10 steps towards make your MS-DOS window bigger:
    
    1. Double click on "My Computer" 
    2. Double click on your Hard Drive, usually "C:" 
    3. Double click on the folder "Windows" (If you need to, click on "show files")
    4. Double click on the folder "System" 
    5. Click on "show files" 
    6. Look for a file called "conagent.exe" and right click on it and 
    select the "Properties" option. 
    7. Click on the "Screen" tab. 
    8. On the right-hand side, where it says "Initial size," select the 
    size to be 50 lines. 
    9. Next, this is important: in the middle section of the panel, 
    UNSELECT "Restore settings on startup". 
    10. Close the window. You're done.
    
    


top || return to course page

Last Modification: Jan 1 2003