CSC 160 - Microsoft Visual C++ Quick Reference
This is a re-munge of the instructions found in Appendix A of our lab manual.
Disk Space - the k: drive
You will use the shared k: drive to store your programming work for class.
Your folder is located at:
k:/03wi/csc1602/
You should see two sub-folders at this location:
- "Common Area" - this is where I will place files used by the
entire class
- There should also be a folder with your ID number. Please change this to
<last_name>_<first_name>. For example, my folder name would be:
"krieger_bill"
Your lab work and your programming assignments will go in your k: drive
folder.
Opening an existing C++ file
Often, you will start with an existing C++ file and modify it. These files
will usually be found in the "Common Area" folder in the k: drive for
our class. Here are the steps you need to follow to use existing files in Visual
C++.
- Either start Visual C++ or make sure all workspaces are closed when
starting
- Click on File/Open to read the file into Visual C++ (usually from
the "Common Area" folder in the k: drive for our class)
- Click on File/Save As and save the file to one of your folders
(usually in your k: drive folder)
- You can now compile this file by selecting Build/Compile. You will
get a message that this will require a project workspace... click yes
to this message
- You can execute the program by selecting Build/Execute. You may get
a message asking if you want to build this file... click yes to this
message.
- Barring any errors, your program should now run in a separate console
window.
Creating a new C++ file
To create your own C++ file from scratch, follow these steps:
- Again, make sure all workspaces are closed prior to starting.
- Click on File/New/Files and then select C++ source file. On
the right side, enter the file name and location (in your k: drive folder).
- After creating your C++ file, you can follow the compile and execute steps
above to run your program.