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 - C++ Learning > C++ method with...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 4251 of 4370
Post > Topic >>

C++ method with constructor behavior?

by Feng <feng07@[EMAIL PROTECTED] > Aug 28, 2008 at 01:58 PM

Hi, I wonder if it is possible to define a C++ method which behaves
like a constructor? e.g. if B inherits A, and both have function f(),
then B::f() would automatically execute A::f() first (without
explicitly calling it).
 




 4 Posts in Topic:
C++ method with constructor behavior?
Feng <feng07@[EMAIL PR  2008-08-28 13:58:36 
Re: C++ method with constructor behavior?
"Alf P. Steinbach&qu  2008-08-29 01:22:15 
Re: C++ method with constructor behavior?
Feng <feng07@[EMAIL PR  2008-08-29 08:19:50 
Re: C++ method with constructor behavior?
"Alf P. Steinbach&qu  2008-08-29 18:36:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Nov 21 12:47:55 CST 2008.