First basic program

LLeweLLyn Reese llewelly@lifesupport.shutdown.com
Mon Feb 24 20:59:00 GMT 2003


bjorn rohde jensen <bjensen@fastmail.fm> writes:

> Hi there,
> 
>   Opinions differ,

The opinions of the C (89,95,99) and C++ standards have always been
    the same: main must return int.

'void main()' first came out of Microsoft before the first C standard
    was finalized in 1988. Why it continues to come out of Microsoft
    is beyond me; perhaps their coding standards are still in the
    80s. :-)

> but it has always been my understanding
> that main should be declared as returning int:) gcc seems
> to think so too.

Correct.

[Other correcct stuff about a.out snipped.]



More information about the Gcc-help mailing list