Why is it so that we can have virtual constructors but we
cannot have virtual destructors?
Answer Posted / rdl
We can have Virtual Destructor. We cannot have virtual
constructor, becoz, if the constructor is virtual, in
polymorphism, there may be a chance for the base class
constructor not to get executed. so the entire class will
not be available.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of polymorphism?
How to improve object oriented design skills?
Why is object oriented programming so hard?
Write a c++ program to display pass and fail for three student using static member function
What is polymorphism programming?
What exactly is polymorphism?
What is encapsulation in oop?
What is an advantage of polymorphism?
What is property in oops?
What is abstraction in oops?
What is encapsulation with example?
What is methods in oop?
What is oops in simple words?
why reinterpret cast is considered dangerous?
Prepare me a program for the animation of train