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
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is a linked list in c++?
When there is a global variable and local variable with the same name, how will you access the global variable?
Explain what is class definition in c++ ?
What do you mean by friend class & friend function in c++?
What is the use of data hiding?
Why do we need c++?
What is a class template in c++?
What is unary operator? List out the different operators involved in the unary operator.
What sorting algorithm does c++ use?
How does work in c++?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What is the advantage of c++ over c?
What is the difference between global variables and static varables?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;