By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,750 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

Overloaded

P: n/a
Can we overload main() function?
Nagaraj

Dec 10 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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...
Dec 10 '05 #2

P: n/a

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"

Dec 10 '05 #3

P: n/a

"Nagaraj" <na********@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Can we overload main() function?
Nagaraj


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

Chris
Dec 10 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.