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 is class in c++ with example?
What happens when you make call 'delete this;'?
Write a struct time where integer m, h, s are its members?
Write a note about the virtual member function?
What is c++ map?
What causes a runtime error c++?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What is the two main roles of operating system?
Can I learn c++ without learning c?
What are formatting flags in ios class?
Which of the following is evaluated first: a) && b) || c) !
Does there exist any other function which can be used to convert an integer or a float to a string?
Is c++ an integer?
Comment on assignment operator in c++.
Define token in c++.