Answer Posted / suresh.k (portblair)
Using virtual destructors, you can destroy objects without
knowing their type - the correct destructor for the object
is invoked using the virtual function mechanism. Note that
destructors can also be declared as pure virtual functions
for abstract classes.
if someone will derive from your class, and if someone will
say "new Derived", where "Derived" is derived from your
class, and if someone will say delete p, where the actual
object's type is "Derived" but the pointer p's type is your
class.
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Templates mean
What is abstraction encapsulation?
Why multiple inheritance is not possible?
What is the fundamental idea of oop?
What is ambiguity in inheritance?
What is a superclass in oop?
Why is encapsulation used?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
What is the difference between static polymorphism and dynamic polymorphism?
officer say me - i am offered to a smoking , then what can you say
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What is the difference between a constructor and a destructor?
How long to learn object oriented programming?
What is the difference between procedural programming and oops?
What is and I oop mean?