Why is it so that we can have virtual constructors but we
cannot have virtual destructors?
Answer Posted / sachinmundhra
vptr gets initialize in constructor. So in that case we
cannot have virtual constructor.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Why do we use polymorphism in oops?
What is the benefit of oop?
What is multilevel inheritance explain with example?
How do you achieve runtime polymorphism?
How do you use inheritance in unity?
What is advantage of inheritance?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
How do you define a class in oop?
What is meant by oops concept?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What is the real time example of inheritance?
What is abstraction in oop?
Which type does string inherit from?
What is difference between abstraction and encapsulation?
Prepare me a program for the animation of train