View Single Post
  #15 (permalink)  
Old December 17th, 2005, 03:07 AM
Ankur_Verma Ankur_Verma is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

The ANSI standards don’t require a program with main returning anything else other
than an int, including void, to fail.

But certainly, programs with main not returning an int are unsafe and their behavior
is unreliable should anything goes wrong.

'void main' however, certainly removes a few errors for a person who is not bothered
about what’s right and what’s wrong and just trying tooth and nail to get his program
to compile at all- so many books these days show program with main returning void, and
many compiler wont even flag a warning on that, but the fact remains that ‘void main’
is incorrect.

I gather that is what you were trying to say with your query -“where did u learn that”
and not asking me the name of the university I went to, right SunnyPal?

Thanks for pointing that out.

Well, when I see something I don’t agree with in a post, I just post my point of view on
that with what I think is the corrected version of the info in the post. I find that more
constructive. But that’s me.

People who are well informed, are always welcome to this forum.
If they could help others as well
 - better yet.

Regards
Ankur Verma
Reply With Quote