How do you know that your class needs a virtual destructor?
Answer Posted / melos
If the class will be derived from and it will need a virtual
destructor so that the destructor of the derived class will
be invoked if it referenced using the pointer to the base class.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is scope resolution operator in c++ with example?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
What is the best c c++ compiler for windows?
What is ios class in c++?
Can we make copy constructor private in c++?
How would you differentiate between a pre and post increment operators while overloading?
What is the error in the code below and how should it be corrected?
Explain operator overloading.
What are destructors?
Do class declarations end with a semicolon?
What is the basic difference between C and C++?
what are Operators and explain with an example?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
Write a program which uses Command Line Arguments
How to allocate memory dynamically for a reference?