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
write a function signature with various number of parameters.
Why is c++ a mid-level programming language?
What is the difference between cin.read() and cin.getline()?
How can I disable the "echo" feature?
Write a recursive program to calculate factorial in c++.
What is pair in c++?
What is the two main roles of operating system?
why and when we can declar member fuction as a private in the class?
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
Does c++ support exception handling?
Which field is used in c++?
Explain pass by value and pass by reference.
How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?
List the types of polymorphism in c++?
What is data structure in c++?