Overloaded

Discussion in 'C++' started by Ben Pope, Dec 10, 2005.

  1. Ben Pope

    Ben Pope Guest

    Nagaraj wrote:
    > Can we overload main() function?


    What would you expect to happen?

    How would expect to choose which overload?

    Ben Pope
    --
    I'm not just a number. To many, I'm known as a string...
    Ben Pope, Dec 10, 2005
    #1
    1. Advertising

  2. Ben Pope

    Nagaraj Guest

    Can we overload main() function?
    Nagaraj
    Nagaraj, Dec 10, 2005
    #2
    1. Advertising

  3. Nagaraj wrote:
    > Can we overload main() function?


    3.6.1p2
    "An implementation shall not predefine the main function. This function
    shall not be overloaded. It shall have a return type of type int, but
    otherwise its type is implementation defined."

    3.6.1p3
    "The function main shall not be used (3.2) within a program. The
    linkage (3.5) of main is
    implementation defined. A program that declares main to be inline or
    static is illformed.
    The name 'main' is not otherwise reserved"
    Neelesh Bodas, Dec 10, 2005
    #3
  4. Ben Pope

    Chris Theis Guest

    "Nagaraj" <> wrote in message
    news:...
    > Can we overload main() function?
    > Nagaraj
    >


    No, and why in the whole world would you want to do that?

    Chris
    Chris Theis, Dec 10, 2005
    #4
    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. Chuck Roth
    Replies:
    2
    Views:
    987
    Mike Treseler
    Sep 10, 2005
  2. Leszek Dubiel
    Replies:
    3
    Views:
    9,770
  3. Barry

    Re: Overloaded method question

    Barry, Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    Barry
    Jul 15, 2003
  4. MS News \(MS ILM\)
    Replies:
    0
    Views:
    1,316
    MS News \(MS ILM\)
    Aug 27, 2003
  5. Blue Streak
    Replies:
    1
    Views:
    291
    Bruce Barker
    Dec 14, 2005
Loading...

Share This Page