Re: help w/ c/c++ problem



"J. J. Farrell" wrote:
On Jul 6, 10:42 am, Keith Thompson <k...@xxxxxxx> wrote:

It's interesting that we don't get nearly as many newbies
thinking the envp parameter is standard as we get thinking
'void main(void)' is standard.

Not really; isn't that simply down to the number of C textbooks
which explicitly say that defining main as void is fine? I don't
think many of them mention the environment extension.

If a so-called "C textbook" says "void main()" is valid and
portable, it isn't a C textbook. It may be a nearly-C textbook.
Unload it for something like K&R II.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
cbfalconer at maineline dot net



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: child exit status query
    ... What textbook are you using? ... The use of the old-style function ... But the use of void as the ... standard -- the very same document that established the requirement ...
    (comp.lang.c)
  • Re: help w/ c/c++ problem
    ... envp parameter is standard as we get thinking 'void main' is ... isn't that simply down to the number of C textbooks which ...
    (comp.lang.c)
  • Re: help w/ c/c++ problem
    ... It's interesting that we don't get nearly as many newbies thinking the ... envp parameter is standard as we get thinking 'void main' is ...
    (comp.lang.c)
  • Re: Inconsistent Program Results
    ... including one of them might trivially slow down compilation, ... I wrote the above (starting with "The standard headers"). ... return void, but there's no advantage in using that. ... You're cheating yourself by ignoring warning messages. ...
    (comp.lang.c)
  • Re: help w/ c/c++ problem
    ... | Then I'm afraid that both your book and your teacher are wrong. ... I'll admit to it when the persons who spent several hundred posts ... standard explicitly allows ... 'void main', then a program that uses 'void main' is valid ...
    (comp.lang.c)