Mail Archives: djgpp/1997/07/07/09:02:35
>What John was saying is that it is not ANSI compliant to use void
>main. I myself use void main, but have switched to int main. I never
>really use the exit code so I didn't care. Anyway, on some compilers
>on some systems, a void main may cause problems, although probably
>not. Better safe than sorry though........
And hey int is a whole letter shorter than void. Why not make life
just a little easier on yourself (this of course ignores the fact that
you must type return (whatever) but hey that's the price you pay for
one character). Also if you type int main (void) people won't get
pissed off at you. All in all I'd have to say typing int main (void)
is the way to go.
Lonnie McCullough
lonniem AT cs DOT utexas DOT edu
- Raw text -