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
Why c++ does not have finally?
What do you mean by persistent and non persistent objects?
What are the benefits of operator overloading?
What is const in c++?
Do class declarations end with a semicolon? Do class method definitions?
How does a copy constructor differs from an overloaded assignment operator?
What is the difference between while and do while loop? Explain with examples.
How do I write a c++ program?
What do you understand by a pure virtual member function?
Which of the following is evaluated first: a) && b) || c) !
Explain rtti.
Which bit wise operator is suitable for turning off a particular bit in a number?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
How do I use turbo c++?
What new()is different from malloc()?