| GNU C++ Compiler
|
Debugging Hints
|
- Fix problems in order--take care
of the first error and then recompile. Problems tend
to have big ripple effects in C++, so if you fix one,
it will probably take care of several others.
- When you hit the -Wall--if you aren't getting any
errors, but your program still isn't running and you
can't figure out what the problem is, try compiling
with all the compiler's warnings enabled (just type
g++ -Wall filename.cpp
to compile). This
will usually warn you about dubiuos sections of code
that aren't syntax errors but may show you a problem
in your logic.
- In function 'int main(...)' is the compiler's
hint to you--it's telling you where to find the error.
This is not an error--the actual errors that
ocurred in this function follow.
- (Each undeclared identifier is reported only once
for each function it appears in.): The compiler
does its level best to cut down on redundancy and
repetition, because fixing the first case will almost
always take care of all the others.
Mail me your suggestions!
Back to Debugging Page
Back to GNU C++ Compiler Home Page
Back to my Home Page
Andrews University's Home Page