Answer Posted / nakul kumar
The simple answer is that a virtual destructor is one that is declared with the virtual attribute.
The behavior of a virtual destructor is what is important. If you destroy an object through a baller or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be complete.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are punctuators in c++?
How we can differentiate between a pre and post increment operators during overloading?
Can you sort a set c++?
write a porgram in c++ that reads an integer and print the biggest digit in the number
Is c++ faster than c?
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
How java is different from c and c++?
What are the various access specifiers in c++?
What is the header file for setw?
What is null pointer and void pointer?
How can you say that a template is better than a base class?
Which function cannot be overloaded c++?
What are maps in c++?
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
When one must use recursion function? Mention what happens when recursion functions are declared inline?