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

the class constructor

P: 9
Can we say that the class constructor is a function? If yes ,then what would be its return type?
Sep 20 '06 #1
Share this Question
Share on Google+
2 Replies


Banfa
Expert Mod 5K+
P: 8,916
It is a function, it has no explicit return type but implicitly it must return void (I guess).
Sep 20 '06 #2

P: 3
a constructor for a class is nothing but another function and it never has a return type. That's why whenever you use a constructor, you don't mention the return type explicitly
Sep 20 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.