Is main function in c++ user defined or built in?

May 22, 2012 at 10:25am
I need expert advice on this one, you know some say that main is user defined as we define the body (that is my opinion too) but others say that is predefined/built-in as the name can not be changed and the declaration is built in! So which of these concepts is correct, you know I had a test today and I was asked this question and I said that it is user defined, now please tell me the correct answer?
Thanks.
May 22, 2012 at 10:30am
closed account (1vRz3TCk)
It is user defined, there is no 'default' version provided by the tool chain.

The Standard wrote:
An implementation shall not predefine the main function.
Last edited on May 22, 2012 at 10:40am
Topic archived. No new replies allowed.