delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/05/13:18:20

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.lang.c++,comp.os.msdos.djgpp
Subject: Re: CIN COUT
Date: Wed, 05 Mar 1997 08:34:52 -0800
Organization: Alcyone Systems
Lines: 17
Message-ID: <331DA0AC.53355F33@alcyone.com>
References: <331BC0D5 DOT 5CB AT aracnet DOT com> <5fjr8f$3ko AT whitbeck DOT ncl DOT ac DOT uk>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dazzling Dazz wrote:

> wouldn't you have to declare main as a void or int? Like this:

Actually, you _have_ to declare it as returning int.  Not doing so is an
draft standard C++ violation.

Not specifying the return type defaults to int.  The program posted has a
no value returned error, but nothing more.

-- 
       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
                                   \
              "I am become death, / destroyer of worlds."
                                 / J. Robert Oppenheimer (quoting legend)

- Raw text -


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