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 > Re: Multiple in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 9 Topic 25750 of 28234
Post > Topic >>

Re: Multiple inheritance doubt

by Antoninus Twink <nospam@[EMAIL PROTECTED] > Apr 20, 2008 at 10:52 PM

On 20 Apr 2008 at 20:27, pradeep wrote:
> class C : public A, public B {
>      ...
> }
>
> void main()
> {
>      A* x = new C;
>      delete (x);
> }
>
> Does the B part of x get deleted properly?

Yes, provided A has a virtual destructor.
 




 9 Posts in Topic:
Multiple inheritance doubt
pradeep <nospam@[EMAIL  2008-04-20 21:27:40 
Re: Multiple inheritance doubt
dj3vande@[EMAIL PROTECTED  2008-04-20 20:34:20 
Re: Multiple inheritance doubt
Antoninus Twink <nospa  2008-04-20 22:52:59 
Re: Multiple inheritance doubt
pradeep <nospam@[EMAIL  2008-04-22 22:06:54 
Re: Multiple inheritance doubt
Ian Collins <ian-news@  2008-04-23 09:09:39 
Re: Multiple inheritance doubt
Keith Thompson <kst-u@  2008-04-22 16:10:56 
Re: Multiple inheritance doubt
CBFalconer <cbfalconer  2008-04-22 18:23:32 
Re: Multiple inheritance doubt
Antoninus Twink <nospa  2008-04-23 00:42:31 
Re: Multiple inheritance doubt
Andrey Tarasevich <and  2008-04-20 14:00:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed Dec 3 17:35:09 CST 2008.