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 is the role of C++ shorthand's?
Write a C++ Program to check whether a number is prime number or not?
an operation between an integer and real always yeilds a) integer result b) real result c) float result
What is the need of a destructor? Explain with the help of an example.
Why is c++ still used?
What is null pointer and void pointer?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
List the advantages of inheritance.
When do you call copy constructors?
Define Virtual function in C++.
Why c++ is faster than java?
What is virtual base class uses?
Why namespace is used in c++?
What parameter does the constructor to an ofstream object take?
Can char be a number c++?