Re: GCC
Werner Mahr <werner@vollstreckernet.de> writes:
> Am Dienstag, 17. Februar 2004 06:27 schrieb Mike M:
>
>> main()
>> test.cpp:4: warning: ISO C++ forbids declaration of `main' with no type
>
> void main(void) and you have a type.
You'd also have undefined behavior then. The main function *must* return
int, see section 3.6.1p2 of ISO/IEC 14882:1998 (the C++ standard).
Martin
Reply to:
- References:
- GCC
- From: Debian User <bfarnell@knology.net>
- Re: GCC
- From: Roberto Sanchez <rcsanchez97@yahoo.es>
- Re: GCC
- From: Mike M <linux-support@earthlink.net>
- Re: GCC
- From: Werner Mahr <werner@vollstreckernet.de>