Notes on compiling.

You can pretty much ignore "warnings" from the compiler, they will not effect the behaviour of the program. Warnings are mostly for very nit-picking minor details that usually are to make the program ultra-conformant to the language standard (for commercial software you would fix the warning problems). Only "errors" prevent the program from being compiled and thus executed. Warnings do not prevent the execution of the program.

Remember F9 in DevCpp and F7 Ctrl-F5 in VC++ compiles and then executes the program (if there are no errors in it). When you compile (get into the hotkey habit, it's faster than moving your hand from the keyboard to the mouse and back) and get a long list of errors ignore all but the first one. Try to fix it, the following errors could just be a result of the first one, so they might not be real errors. Don't worry about the number of errors when you are fixing syntax errors. Reduce them one by one starting at the first.

Loop: Correct the first error, Compile/Run/Build. Until no more syntax errors, and then the program will execute.

DevCpp: when the program finishes the DOS box terminates. If you want to wait until you terminate, add system("pause"); as the last statement in main.

Some notes on grading:

The major part of the grade/score you receive for the homeworks is for a correctly working program; that does everything required of it as specified in the assignment, that does so without error. You need to thoroughly test the program to make sure all possible logical paths thru the code work correctly. E.g. lab 1: test all the error handling and also check a few scenarios (check against hand computed values, don't believe what your program tells you, it could be in error and thus "lying").

A program must also look good:

Warm-ups

adder.cpp
quad1.cpp
quad2.cpp
Compiler doesn't care about format: quadbad.cpp

Next Identifiers


© 2000 David Wills