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
Define pre-condition and post-condition to a member function in c++?
Why do we use using namespace std in c++?
What is the difference between public and private data members?
What is const in c++?
What is the return value of the insertion operator?
What is the difference between struct and class?
What is c++ hiding?
What is buffer and example?
What is the use of object in c++?
What are disadvantages of pointers?
Can you Mention some Application of C/C++?
How do you initialize a string in c++?
What do you mean by global variables?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
Can we use this pointer in a class specific, operator-overloading function for new operator?