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
How do you add an element to a set in c++?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
When do we run a shell in the unix system? How will you tell which shell you are running?
What is the use of ::(scope resolution operator)?
Is swift faster than go?
Explain the difference between overloading and overriding?
What is polymorphism and its type in c++?
Why is the function main() special?
What is :: operator in c++?
Can a class be static in c++?
Which software is best for coding?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
What is difference between class and structure in c++?
Which programming language is best?
What is general form of pure virtual function? Explain?