BUILD A NEW C PROJECT AND PROGRAM - MICROSOFT VISUAL STUDIO 2008

(Note: a dash precedes a selection or action you need to take.)


LOG IN TO A WINDOWS MACHINE IN THE DE ANZA CIS LAB in ATC 203

- see the blue handout for instructions, if needed


START MICROSOFT VISUAL STUDIO 2008


- start - All Programs - C.I.S - Microsoft Visual Studio 2008

- Microsoft Visual Studio 2008

"This might take a few minutes." SLOW


CREATE THE PROJECT


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


CREATE THE PROGRAM SOURCE FILE


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


TYPE YOUR PROGRAM


- 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


BUILD THE MACHINE CODE


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.


RUN THE PROGRAM


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.


SAVE THE RESULTS


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

*/


PRINT THE PROGRAM TO TURN IN


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