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
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
Can java be faster than c++?
What is a constant? Explain with an example.
What is const pointer and const reference?
Can we use this pointer inside static member function?
What is a hash function c++?
How a macro differs from a template?
Should I learn c++ c?
Explain all the C++ concepts using examples.
Which bit wise operator is suitable for checking whether a particular bit is on or off?
Refer to a name of class or function that is defined within a namespace?
Can a function take variable length arguments, if yes, how?
What causes a runtime error c++?
What is the main purpose of c++?
What is a container class? What are the types of container classes in c++?