http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help! I can't find out what's wrong!



> Can somebody please take a look at this piece of C++ code, it tells me
> that there's a parse error before { in line 8?

One more thing (Not the cause of your error) is that the main() function
should return an int, not void. The return-value of main() is used as the
ERRORLEVEL of the program on exit (use "return 0" to exit the program
without indicating an error). I don't know how the exit() function works,
but I assume it accomplishes the same thing. Somehow return seems more
natural (since the function is supposed to return something, even if it
never gets to that point b/c of a call to exit(), still . . . ) unless you
have an error within another function in which case exit(1<or 2, or
whatever>) might be appropreate.

-- Neil Edelman
-- ICQ UIN: 705130
-- email: mailto:dreaded.neil@phreaker.net?subject=sig
-- home: http://members.xoom.com/dreadedneil
-- moop: http://moop.bizland.com
-- "My air-to-air missile overrides your air traffic control clearance"
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html