From: Dave Bird Newsgroups: comp.os.msdos.djgpp Subject: Re: Duh Date: Sun, 21 Feb 1999 02:15:16 +0000 Organization: very little Message-ID: References: <36CCA146 DOT 8BCD8720 AT mail DOT globalserve DOT net> <7alvgv$25g$1 AT news7 DOT svr DOT pol DOT co DOT uk> <36CEADC5 DOT 7422E668 AT xyz DOT net> NNTP-Posting-Host: xemu.demon.co.uk X-NNTP-Posting-Host: xemu.demon.co.uk:158.152.196.209 X-Trace: news.demon.co.uk 919606501 nnrp-07:13676 NO-IDENT xemu.demon.co.uk:158.152.196.209 X-Complaints-To: abuse AT demon DOT net MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain;charset=iso-8859-1 X-Newsreader: Turnpike (32) Version 4.01 Lines: 20 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In ar<36CEADC5 DOT 7422E668 AT xyz DOT net>, Bjørn Hansen writes >> #include >> >> void main() >> { >> cout<<"Hello world"> return 0; >> } > >I havn't done a whole bunch of progremming in C++ so I was wondering why you >declared main as void and then have it return a value? Whoops -- because he goofed. Having void main(), or sometimes having int main(){ ..... return n; } are both acceptable. Have a void function return a value isn't! -- Dave[XEMU] ________________(....=^¬¬^=______ ---<,,">