Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Why do construc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 23 Topic 43340 of 48020
Post > Topic >>

Why do constructors have same name as the class ?

by yeti <rohin.koul@[EMAIL PROTECTED] > Feb 15, 2008 at 08:27 AM

Hi,
I have few simple question.
1. Why does the constructor and destructor have same name as the class
it
belongs to ??

2. Why can't constructor and destructor return values ??

regards

Rohin
 




 23 Posts in Topic:
Why do constructors have same name as the class ?
yeti <rohin.koul@[EMAI  2008-02-15 08:27:05 
Re: Why do constructors have same name as the class ?
"Fabian Lenzen"  2008-02-15 17:31:47 
Re: Why do constructors have same name as the class ?
Tim Slattery <Slattery  2008-02-15 16:11:50 
Re: Why do constructors have same name as the class ?
"Mike Wahler" &  2008-02-15 09:05:23 
Re: Why do constructors have same name as the class ?
red floyd <no.spam@[EM  2008-02-15 09:36:41 
Re: Why do constructors have same name as the class ?
James Kanze <james.kan  2008-02-15 13:04:52 
Re: Why do constructors have same name as the class ?
"Alf P. Steinbach&qu  2008-02-15 22:28:29 
Re: Why do constructors have same name as the class ?
Ian Collins <ian-news@  2008-02-16 10:40:15 
Re: Why do constructors have same name as the class ?
"Victor Bazarov"  2008-02-15 16:49:31 
Re: Why do constructors have same name as the class ?
Ian Collins <ian-news@  2008-02-16 11:01:45 
Re: Why do constructors have same name as the class ?
Andre Kostur <nntpspam  2008-02-15 22:21:52 
Re: Why do constructors have same name as the class ?
Raymond <raymond@[EMAI  2008-02-16 12:52:02 
Re: Why do constructors have same name as the class ?
James Kanze <james.kan  2008-02-16 00:48:34 
Re: Why do constructors have same name as the class ?
yeti <rohin.koul@[EMAI  2008-02-16 06:47:35 
Re: Why do constructors have same name as the class ?
yeti <rohin.koul@[EMAI  2008-02-16 06:53:40 
Re: Why do constructors have same name as the class ?
Ian Collins <ian-news@  2008-02-17 08:31:53 
Re: Why do constructors have same name as the class ?
James Kanze <james.kan  2008-02-16 12:56:30 
Re: Why do constructors have same name as the class ?
In the Middle of the Pack  2008-02-26 19:04:24 
Re: Why do constructors have same name as the class ?
"Ole Nielsby" &  2008-02-29 00:17:17 
Re: Why do constructors have same name as the class ?
"jason.cipriani@[EMA  2008-02-26 19:32:38 
Re: Why do constructors have same name as the class ?
"jason.cipriani@[EMA  2008-02-26 19:38:37 
Re: Why do constructors have same name as the class ?
James Kanze <james.kan  2008-02-27 01:31:57 
Re: Why do constructors have same name as the class ?
peter koch <peter.koch  2008-02-28 16:08:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 8:47:35 CDT 2008.