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
How does a copy constructor differs from an overloaded assignment operator?
How do I run c++?
Tell me an example where stacks are useful?
Write a program to concatenate two strings.
Keyword mean in declaration?
Why c++ is called oop?
Are c and c++ different?
What are virtual constructors/destructors?
Write about a nested class and mention its use?
What is abstraction in c++?
Are c and c++ similar?
What is a type library?
What is function overloading c++?
What is a loop? What are different types of loops in c++?
Explain terminate() and unexpected() function?