when can we use virtual destructor?
Answer Posted / yaggu
Basically, the characteristics it self defines, that
constructor can not be virtual but overloaded while in the
inverse to this, the destructor can not be
overloaded....means there may be more than one constructors
in class and when you create the object of the class,
constructor invokes and when you do not need at the same
time though you define more than one constructors but with
only one destructor we can destroy the object.....that is why...
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What are compilers in c++?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Describe the advantage of an external iterator.
What are the two types of comments?
What is the best c++ compiler for windows 10?
What is guard code in c++?
What is a c++ class?
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?
Write bites in Turbo c++ Header ("Include") Files.
Is c++ primer good for beginners?
What causes a runtime error c++?
Why is c++ difficult?
What are virtual constructors/destructors?
Can you overload the operator+ for short integers?