How do you know that your class needs a virtual destructor?

Answer Posted / nishikant sahu

If programmer intended to act the class as a BASE class
somewhere then it is rule of thumb or good programming that
you have to have declare your constructor virtual.

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is conditions when using boolean operators?

592


What is array in c++ pdf?

548


How many types of classes are there in c++?

589


What do you mean by enumerated data type?

568


Difference between a homogeneous and a heterogeneous container

657






Can recursive program be written in C++?

625


What is the difference between a declaration and a definition?

577


What is a literal in c++?

560


What do you mean by const correctness?

620


Can a program run without main?

620


What is boyce codd normal form in c++?

686


If a function doesn’t return a value, how do you declare the function?

609


Explain overriding.

598


How do we implement inheritance in c++?

580


What is the difference between a type-specific template friend class and a general template friend class?

548