Quote:
|
Originally Posted by Rickertsen2
It just seems to me that it should give you a more sensible error and point you to the line where you made a mistake...
|
The problem here is that C has very terse syntax. If you make a simple mistake, it's very likely that the result is still "correct" C, and the compiler will happily accept it.
If you misplace a closing brace, A C compiler has no idea where it was really supposed to go. All it knows, for example, is that it encountered an
else statement somewhere other than immediately after an
if body. The actual error could have been on the previous line, or ten lines up. The compiler can't tell.