Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Related to sequence of call of destructor within the C and C++ forums, part of the Software Development category; Hi to all, i have a question. If class c derived from class a and class b also. Then while deleting object of class c which one is called first ...
|
|||||||
|
|||
|
Related to sequence of call of destructor
Hi to all, i have a question. If class c derived from class a and class b also. Then while deleting object of class c which one is called first class a destructor or class b destructor? thanks
|
| Sponsored Links |
|
|||
|
Re: Related to sequence of call of destructor
Hi Ashish,
It depends on the sequence you mentioned while derving the class c. for example: class c:: pub A, pub B then Destructor of A gets called first and vise versa. I hope its clear. let me know if i m wrong. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Call by Value and Call by Reference | Lokesh M | C and C++ | 2 | 06-23-2009 03:29 AM |
| constructor & destructor | Molugu Natraj | C and C++ | 6 | 05-10-2009 09:41 AM |
| constructor and destructor | Sangeetha Poojary | C and C++ | 8 | 04-06-2009 01:47 PM |
| Can a structure in C++ have a Constructor and Destructor | coolsomoo | C and C++ | 2 | 02-02-2009 07:45 AM |
| What comes next in this sequence? | psuresh1982 | Brainteasers | 5 | 11-29-2006 01:45 AM |