Mail Archives: djgpp/1999/10/28/10:26:21
On Thu, 28 Oct 1999 00:11:22 GMT, Damian Yerrick
<DELCAPSyerricde AT pineight DOT 8mSOFTWARE DOT com> wrote:
>On Wed, 27 Oct 1999 18:50:31 -0400,
>Rodeo Red <rodeored AT netstep DOT net> wrote:
>
>> This is my current version of Hello.cpp:
>>
>> #include <iostream.h>
>
>Problem #1: <iostream.h> is the old way.
>
>#include <iostream>
>
>> int main (void);
>
>Problem #2: A prototype for a function should have a following ; but
>the function definition should not.
>
>int main(void)
>
>> {
>> cout <<"Hello world!\n";
>
>Problem #3: The function returns an undefined number.
>
>return 0;
>
I haven't read the C++ standard in a while, but I have a funny feeling
there was a provision for main() not to have a return statement. If
it was omitted, it implicitly returned 0. Can anyone confirm/shoot me
down?
[snip]
--
Chris Mears
- Raw text -