quote: Original post by Anonymous Poster
But we might aswell help him out with standard C++ if we''re going to give him examples.
Main does NOT take void as an argument and it doesn''t HAVE to return anything.
Cheers.
Oops. Looked like I hijacked this thread with my ambiguous post above. What I intended to say was that:-
1) main doesn''t take void as an argument
2) it doesn''t have to return anything. i.e. it is a special function in the sense that you don''t need to return an integer. If control reaches the end of main without finding a return statement it will have the same effect as return 0;
3) and I''ll add another point - main must have a return type of type int.
This post to comp.lang.c++ says it well
Happy C++ing