Big Deal with returning int

M

Min

I have seen so many pointing out "main" should explicitly return "int".
Beside, the language spec or committee, or some guru said so, what is a BIG
deal with it ? What difference does it make if "void main" rather than "int
main" ? It is not that some obscure code that people can't understand
easily. Anyway, would someone explain why ;? not just it is better to
return explicitly.

Or How is it possibly cause the problem ?

PS: I am saying this because most of C++ books I found, uses "void main".
If they can't get this fundamental thing right, I guess, I have been reading
all the garbage from them.
 
S

Stuart Golodetz

Dill Hole said:
Misspelling "practice" shows that you do not know English very well.
If you do not have English mastered why should we trust your C++
abilities?

Why exactly a command of English is necessary in order to be a competent C++
programmer escapes me. Anyway, if you're going to resort to pedantry in an
attempt to prove something, you might as well get it right. Consider your
final sentence: "If you do not have English mastered why should we trust
your C++ abilities?" Now you may consider this overly pedantic, but I'm
curious to know whether you have encountered commas in your clearly
extensive study of the English language. Of course, in "Dill Hole" English,
a peculiar dialect apparently spoken only by you, it's quite possible that,
in the final sentence above, the word "mastered" is not followed by a comma.
Unfortunately, this is not the case in the actual language. I think what I'm
saying essentially boils down to the well-known proverb, "People in
glasshouses shouldn't throw stones."

While we're engaging in the rather pointless activity of launching
"ad-hominem" attacks, might I also suggest that a course in logic would
benefit you enormously? A command of English is neither necessary nor
sufficient for a programmer. There are many extremely good programmers who
don't speak a word of English. There are also many people who speak
excellent English but would find a C++ program incomprehensible. Whilst it
is important to be able to write correctly in your native language, for
reasons largely unrelated to programming, your ability (or otherwise) to do
so is nevertheless irrelevant to your ability as a C++ programmer.

Now that that's settled, can we try and avoid "ad-hominem" attacks that add
nothing to the discussion at hand?

Cheers,

Stuart.
 
A

Alexander Terekhov

Andre Kostur wrote:
[...]
POSIX.1 is a platform/implementation specific library,

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarwbgen/html/msdn_posix.asp

<quote>

POSIX stands for Portable Operating System Interface for computing
environments. POSIX began as an effort by the IEEE community to
promote the portability of applications across UNIX(R) environments
by developing a clear, consistent, and unambiguous set of standards.
However, POSIX is not limited to the UNIX environment. It can also
be implemented on non-UNIX operating systems, as was done with the
IEEE Standard 1003.1-1990 (POSIX.1) Implementation on Virtual
Memory System (VMS), Multiprogramming Executive (MPE), and the
Conversion Technology Operating System (CTOS). POSIX actually
consists of a set of standards ....

and thus is off-topic for this newsgroup.

Nothing is off-topic here, darling.

regards,
alexander.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top