delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/05/00:39:23

From: DavMac AT iname DOT com (Davin McCall)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: problems compiling c++ in rhide
Date: Sun, 05 Sep 1999 03:40:50 GMT
Organization: Monash Uni
Lines: 30
Distribution: world
Message-ID: <37d1e584.1389070@newsserver.cc.monash.edu.au>
References: <7qjmhn$o47$1 AT nickel DOT uunet DOT be> <37D0B102 DOT 389529B AT earthlink DOT net> <7qrfmq$qvq$1 AT solomon DOT cs DOT rose-hulman DOT edu>
NNTP-Posting-Host: damcc5.halls.monash.edu.au
X-Trace: towncrier.cc.monash.edu.au 936502795 27512 130.194.198.138 (5 Sep 1999 03:39:55 GMT)
X-Complaints-To: abuse AT monash DOT edu DOT au
NNTP-Posting-Date: 5 Sep 1999 03:39:55 GMT
X-Newsreader: Forte Free Agent 1.1/32.230
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019