- see the blue handout for instructions, if needed
- start - All Programs - C.I.S - Microsoft Visual Studio 2008
- Microsoft Visual Studio 2008
"This might take a few minutes." SLOW
In the menu: - File - New – Project
- click the + sign by Visual C++
Select: - General – Empty project
Name: - the name of your lab problem, such as lab1a
Location: - z:\Visual Studio 2005\Projects or browse in My Documents for a folder
- OK
It may warn you that it does not trust our server: - OK
In the menu: - Project - Add new item
Categories: - Code
Visual Studio installed templates: - C++ File(.cpp)
Name: - the name MUST END WITH .c to be C code, without this it may not work
if the name of your project is lab1a, the file name should be lab1a.c
do not forget the .c at the end of the name.
- Add
- You can now type your program in the file window, which is now open
Every time, after you type new code, or change code, save the code:
In the menu: - File - Save All
In the menu: - Build - Build Solution
Errors will show in the window at the bottom.
Scroll this window to see each error.
Double click on an error to find the location of the error.
Try to fix one or two errors; then build the solution again.
When there are no errors and no warnings, you are ready to run the program
- Debug - Start without debugging
Look at the results; if it is not what you need for the final results - click X
Type revisions to your code, build the machine code again, and run it again;
be sure to save the code after you revise it.
When
you have tested your results several times successfully,
run your
program with the test data specified by the instructor,
to get the
final result.
In the execution results window:
- click the C:\ icon in the top left - Edit - Select all
- click the C:\ icon in the top left - Edit - Copy
In your program, in the Execution results comment at the end of the program:
/* Execution results
- right click here - paste
*/
Do not print until you are satisfied the program is correct, and
the final results are included with the data specified by the instructor.
- Click in the frame that contains your code, so your code file is selected
- File - Print - OK