Why would you make a destructor virtual?
Answer Posted / sunny bogawat
we make destructure as virtual because when we derived a
class from base class then destructor called from derived
to base so for this happening correctly we haveto make base
class destructor as avirtual.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you mean by vtable and vptr in c++?
Are c and c++ different?
What is the need of a destructor?
What would happen on forgetting [], while deallocating an array through new?
What is c++ map?
What is namespace std; and what is consists of?
Is turbo c++ free?
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].
What does catch(…) mean?
What is token c++?
How does a C++ structure differ from a C++ class?
What are the benefits of operator overloading?
Is c++ a programming language?
What are the rules about using an underscore in a c++ identifier?
what is Loop function? What are different types of Loops?