delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/28/10:26:21

From: chris_mears AT softhome DOT net (Chris Mears)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Read Me Third: A Short FAQ List
Organization: CHOAM
Message-ID: <38193387.616294@news.bigpond.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991020140410 DOT 22660f-100000 AT is> <0A02668AA6DAF2EA DOT B7324B0997533B2E DOT A43653802EA26ABD AT lp DOT airnews DOT net> <7oUXONJSazygooCyeWwSD8msc766 AT 4ax DOT com>
X-Newsreader: Forte Agent 1.5/32.452
MIME-Version: 1.0
Lines: 38
Date: Thu, 28 Oct 1999 11:30:59 GMT
NNTP-Posting-Host: 139.134.195.1
X-Trace: newsfeeds.bigpond.com 941110016 139.134.195.1 (Thu, 28 Oct 1999 21:26:56 EST)
NNTP-Posting-Date: Thu, 28 Oct 1999 21:26:56 EST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


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