Mail Archives: djgpp/1998/10/16/01:12:43.1
George Foot wrote:
>
> On Thu, 15 Oct 1998 silkwodj AT my-dejanews DOT com wrote:
>
> > C:\Work\pcx >gcc pcxview3.cc pcx.o myscrn1.o myscrn2.cc -o pcxview.exe
> > pcxview3.cc:71: parse error at end of input.
> >
> > Now my pcxview3.cc file has only 70 lines in it! What's also baffling is the
> > file pcx.o was compiled a couple of weeks ago, but now I can't compile it
> > again. I get the same kind of error message for the end of its 276 lines of
> > code.
>
> It probably is a missing brace; look again out for mismatched
> braces. Do you indent your code? That helps you to keep track
> of the brace depth.
If you use Emacs, the indenting is useful. I can't count the number of
times I've been confused when the indenting seems to screw up, only to
find it was a syntax error in my code (missing semicolons, mismatched
braces/parens, etc). The only disadvantage is it's somewhat difficult
to set up an indentation style different from the default (not a problem
for me, I happen to like GNU style). I think there may also be commands
which show a brace/paren/bracket's match.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -