Mail Archives: djgpp/1999/09/05/00:39:23
By procedure, I take it you mean "function with no return type"?
The main function is supposed to return an int. The value is passed
back to the OS when the program finishes, and is generally accessible
by the parent process. In practice, I have found that not returning a
value doesn't cause any harm, however it takes so little effort to
change that "void" to an "int" and that "return" to "return 0" that
you might as well just be safe.
Davin.
On Sat, 4 Sep 1999 10:58:33 -0500, "Damian Yerrick"
<die DOT spammers AT pineight DOT 8m DOT com> wrote:
>Illegal return type? Some C/C++ programming books encourage
>a fellow to make main() a procedure. But maybe that's because I
>came from a Macintosh background, and this is DOS.
>
>> that you compiled "-o with -c or -S and multiple compilations."
>
>What the heck does that mean? Please specify the versions of
>the compiler and binutils you are using, along with the entire
>command line you gave to gcc.
>
__________________________________________________________
*** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/
- Raw text -