www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/07/09:02:35

From: lonniem AT cs DOT utexas DOT edu (Lonnie McCullough)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: void main ?
Date: Sun, 06 Jul 1997 23:43:15 GMT
Message-ID: <33c02cde.2238551@news.nol.net>
References: <resta-0307971339210001 AT mac-resta DOT imc DOT pi DOT cnr DOT it> <33bd92cb DOT 4829262 AT usenet DOT nau DOT edu>
NNTP-Posting-Host: ip39-17.nol.net
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>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 -


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