Big Deal with returning int

Discussion in 'C++' started by Min, Jun 29, 2003.

  1. Min

    Min Guest

    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.
     
    Min, Jun 29, 2003
    #1
    1. Advertising

  2. "Dill Hole" <> wrote in message
    news:...
    > On Sun, 29 Jun 2003 13:59:15 +0200, Rolf Magnus <>
    > wrote:
    >
    > >I see it a bit different. If an author uses void main, that shows that
    > >he doesn't know C++ very well. This gives not much trust in the rest of
    > >the book.
    > >
    > >
    > >It's quite interesting that you call "void main" common practise, since
    > >it actually never was allowed. So you think the rule should be changed,
    > >because nobody follows it anyway?

    >
    > 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.
     
    Stuart Golodetz, Jul 2, 2003
    #2
    1. Advertising

  3. 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 ....

    </quote>

    > and thus is off-topic for this newsgroup.


    Nothing is off-topic here, darling.

    regards,
    alexander.
     
    Alexander Terekhov, Jul 2, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian
    Replies:
    0
    Views:
    670
  2. John Harrison

    Re: Big Deal with returning int

    John Harrison, Jun 29, 2003, in forum: C++
    Replies:
    5
    Views:
    835
    Karl Heinz Buchegger
    Jun 30, 2003
  3. Kelsey Bjarnason

    Re: Big Deal with returning int

    Kelsey Bjarnason, Jun 29, 2003, in forum: C++
    Replies:
    38
    Views:
    1,664
    Andre Kostur
    Jul 1, 2003
  4. Rolf Magnus

    Re: Big Deal with returning int

    Rolf Magnus, Jun 29, 2003, in forum: C++
    Replies:
    0
    Views:
    650
    Rolf Magnus
    Jun 29, 2003
  5. Samuele Armondi

    Re: Big Deal with returning int

    Samuele Armondi, Jun 29, 2003, in forum: C++
    Replies:
    0
    Views:
    706
    Samuele Armondi
    Jun 29, 2003
Loading...

Share This Page