From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: problems with void main(...) Date: Sat, 05 Jul 1997 17:11:04 -0700 Organization: Alcyone Systems Lines: 30 Message-ID: <33BEE298.53C16CCE@alcyone.com> References: <97Jul5.182622gmt+0100 DOT 16642 AT internet01 DOT amc DOT de> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Chris Croughton wrote: > Where in the ANSI C standard does it say that main > must have type 'int'? I can't find it. > > It may say so in the DRAFT C++ standard, but that is > not yet approved as far as I am aware. > > Please quote the section, because I don't believe that > it was put into the ANSI C standard. This is periodically posted, and is in the comp.lang.c FAQ. The section is ANSI C 5.1.2.2.1: The function called at program startup is named main. . . . It can be defined with no parameters: int main(void) { /* ... */ } or with two parameters . . .: int main(int argc, char *argv[]) { /* ... */ } -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "All the gods are dead / except the god of war." / Eldridge Cleaver