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
Get me an image implementation program.
What is the purpose of polymorphism?
What are the 4 main oop principles?
Why do we need polymorphism in c#?
write a program that takes input in digits and display the result in words from 1 to 1000
How to call a non virtual function in the derived class by using base class pointer
Why is abstraction used?
How does polymorphism work?
What exactly is polymorphism?
Which language is pure oop?
What is the advantage of oop over procedural language?
Prepare me a program for the animation of train
What is object and class in oops?
What is encapsulation in simple terms?
What do you mean by overloading?