Answer Posted / munendra 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 pointer 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
Why c++ is the best language?
Why is c++ a mid-level programming language?
Is swift a good first language?
How can I learn c++ easily?
What is the most powerful coding language?
What is private, public and protected inheritance?
What is a sequence in c++?
How do you flush a buffer in c++?
What are the uses of pointers?
Explain abstraction.
Can char be a number c++?
Is it possible to write a c++ template to check for a function's existence?
Out of fgets() and gets() which function is safe to use and why?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
What is atoi in c++?