delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/09/16:35:44

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Templates
Date: 9 Jun 1997 12:34:03 GMT
Organization: Oxford University, England
Message-ID: <5ngt7r$pph@news.ox.ac.uk>
References: <3 DOT 0 DOT 16 DOT 19970608164854 DOT 2e3f02e6 AT hem1 DOT passagen DOT se> <3399D9C3 DOT 2DB0 AT xl DOT ca>
NNTP-Posting-Host: sable.ox.ac.uk
Lines: 12
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Darren Grant (darn AT xl DOT ca) wrote:

:      void main();

This is wrong. In C++ the main function absolutely must return an int; 
the strict type checking in C++ makes this very important. gcc
automatically switches the prototype to return int, but you ought to
declare it to return int explicitly yourself, and return a value. 

-- 
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford

- Raw text -


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