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


Please Help Members By Posting Answers For Below Questions

What is the full form of oops?

943


What is the use of oops?

823


What is polymorphism what is it for and how is it used?

794


What is object and class in oops?

814


What are the features of oop?

864


What is an example of genetic polymorphism?

900


What is debug class?what is trace class? What differences are between them? With examples.

1886


What is difference between pop and oop?

839


How do you use inheritance in unity?

823


What is a class oop?

780


What is oops concept with example?

794


What are the 4 main oop principles?

958


What is polymorphism used for?

798


What are oops functions?

801


What is the oops and benefits of oops programming?

759