What is a virtual destructor?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
What is function overriding?
What are associate containers?
Write about the local class and mention its use?
What does extern mean in a function declaration in c++?
What is a binary file? List the merits and demerits of the binary file usagein C++.
What do you mean by abstraction. Explain your answer?
what does the following statement mean? int (*a)[4]
What is the difference between stack and heap memory?
What is virtual destructor ans explain its use?
write a C++ programming :if the no is between 32 to 50 it will be odd.
Mention the purpose of istream class?
Why can you not make a constructor as const?