Article View: alt.msdos.programmer
Article #1165Re: Pascal program works but not C program!
From: Gene Wirchenko
Date: Mon, 08 Jan 1996 02:08
Date: Mon, 08 Jan 1996 02:08
27 lines
1313 bytes
1313 bytes
Tasmaniac@unicall.be (Tasmaniac) wrote:
[snip]
>>> void main(int argc,char *argv[])
>> ^-----------------------------This one too, but not too serious
>why is this a problem ?
>>Another problem, not as serious as the previous one, although this is not
>>the reason the C++ version might not work; main() should be defined
>>returning int, not void.
>It's 100% legal to declare main as any of the following
[snipped garbage list]
Kindly read the FAQ! Per the C standard, main() must return int.
That your compiler may not complain makes no difference. It is not
valid C.
Sincerely,
Gene Wirchenko
C Pronunciation Guide:
y=x++; "wye equals ex plus plus semicolon"
x=x++; "ex equals ex doublecross semicolon"
Technical Details
Message-ID:
<4cpuin$gqj@fountain.mindlink.net>Path:
arc1-ca.pugleaf.net!news.mindlink.net!newsReferences:
<4cdpr2$psi@lugb.latrobe.edu.au> <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il> <4cp3vc$8nh@brahms.tfi.be>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mindlink.net!news From: genew@mindlink.bc.ca (Gene Wirchenko) Newsgroups: alt.msdos.programmer,comp.lang.c Subject: Re: Pascal program works but not C program! Date: Mon, 08 Jan 1996 02:08:27 GMT Organization: MIND LINK! - British Columbia, Canada Message-ID: <4cpuin$gqj@fountain.mindlink.net> References: <4cdpr2$psi@lugb.latrobe.edu.au> <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il> <4cp3vc$8nh@brahms.tfi.be> NNTP-Posting-Host: line019.nwm.mindlink.net X-Newsreader: Forte Free Agent 1.0.82