CPS 202
Using Visual C++
Creating a new program
When you are done with your program, save it to diskette (or save it in some other way, such as to a ZIP file then to diskette,m emailing it to yourself, or ftp to your server). Close the source code window and close the workspace. Click on the "New window" button again, or click File|New.
If you do not close the workspace, Visual C++ will probably try to compile your two .c files together, which is a Bad Thing.
Compiling on Diskette
Compiling on diskette is not recommended. First, diskette access times are extremely slow. Second, because names on a diskette must be of the DOS 8.3 format, Visual C++ will only allow you to compile your file once and will then refuse to compile again. Lastly, because Visual C++ creates several auxilliary files, your diskette can quickly fill up.
Compiling using other compilers
You can download Turbo C++ from the Borland website. This is a DOS compiler which should run just fine in any version of Windows (though I've heard that Windows ME users have trouble with it). It is small, fast, and robust, but lacks any features of Windows. Turbo C++ wil compile C or C++ files.
Several "Learn C" books include a copy of Microsoft's QuickC program. Some versions of QuickC will not create stand-alone EXE files (you will only be able to execute the program from within QuickC). QuickC is, like Turbo C++, small and fast. It will compile only C files.
Visual C++, Turbo C++, and QuickC all use an "IDE," an Integrated Development Environment. This allows you to write, compile, build, and run programs all within one program or window.
If you have access to a Unix/AIX/FreeBSD/Linux machine, these almost always have a compiler installed. To see if you do, open a command line window and at your user prompt, type "cc" and press enter. If cc is not available, try "gcc". To compile a file, the command would be:
cc name.c -o name
where "name.c" is your source file and "name" is the executable to create. To write the source file, you would need to use a text editor such as vi, joe, or emacs.