VISUAL C++ 6.0
HOW TO EDIT,
COMPILE, AND RUN (EXECUTE) A PROGRAM
1. Type the program
In order to type a program you need to use an editor (text processor).
· Most compilers come with their own editor, so that you do not have to use an outside editor. For example as you activate the compiler (visual C++, or Borland C++) you are in editor mode.
· You can also use an outside text editor such as notepad in Windows (Microsoft Word may also be used as long as you save it as a text file). In Unix or Linux you can use Pico or vi. When you are using an outside editor be sure to save the file with the extension .cpp (eg. Hw1.cpp).
2. Compile the program
When you compile your program you will be doing the following two things:
· Checking for syntax errors
· Translate to object code (lower level language)
Hint: You are making the program ready to execute.
3. Execute (run) the program
In order to execute your program you may need to provide input. Input data can be entered by the keyboard or already be typed in a file (data/input file), or both. To create an input file you do it the same way as you would write a program, be sure to save it with an extension such as in, dat, or txt. Such data has to be connected to the program either through the program or the help of the operating system.
To open project:
1. Click on file
2. Click on new
3. Click on project tab
4. Go down to Win32 console
application
5. Click on it and in top right
corner name your project
6. Click on OK
7. Check off Empty project
8. Click finish
9. Click OK
10.
Write your code
11.
Compile it
1. After typing code click on
file
2. Click on new
3. Click on files tab
4. Click on text file
5. On right side type in file
name
6. Click on ok
7. On left side of screen you will see your data file











