CGS 2423: C for Engineers -- Fall 04
Running C programs in the Visual C environment
- Create a new Folder for your program. A separate directory is
recommended for each homework assignment. For this example, we will call
this directory "Program1".
- Open Microsoft Visual C++ (Click on Start and fnd the program)
- Click on File, then click on New
- Open the tab called Files
- Type in a name under File name:. For this example, we will assume
that you typed in "Add.c"
- Select the correct directory under Location:. For this example,
we will assume that you typed in "Program1"
- Click on C++ Source File and click on OK.
- A window will open up. Type in your program into this window.
Save the program by clicking on Save.
- Click on the tab Build and click on Build in the drop
down menu. It will ask to create a default project workspace. Click Yes.
- If there are no errors in your program, then a ".exe" file is
automatically created. For this example, it would be called "Add.exe"
- Click on Execute under the Build tab to execute your program.