Mail Archives: djgpp/1997/07/05/20:32:19
Giovanni Resta wrote:
> I always declared main as void in the past 5 years and
> I never get an error, so I'm curious about the topic.
> (I must admit that I never had to test the 'exit code' of a program,
> maybe that can change things)
There are only two valid ANSI C prototypes for main:
int main(void);
int main(int argc, char *argv[]); /* the names of the arguments can
vary, of course */
This is clearly indicated in section 5.1.2.2.1 of the ANSI C standard.
--
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
\
"Covenants without the sword / are but words."
/ Camden
- Raw text -