Re: warnings, errors;source code is included



In message <Pine.LNX.3.96.991115094757.10551E-100000@quoll.daa.com.au>, James H
enstridge writes:

>Of course, since he used exit(0) at the end of main, we never get to the
>end of main (exit does not return control to the calling function).  So it
>would not matter what the return type of main was.  Yes it is true that
>you should use "int main(...".

void main() isn't valid ANSI C and hence its use should be highly discouraged!

John

--
John GOTTS <jgotts@linuxsavvy.com>  http://www.linuxsavvy.com/staff/jgotts



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