How to construct virtual constructor

Answer Posted / gaurav

The first thing, Why we need a Virtual constructors, do we
really need that..... :) If I am making an object of A then
I should not expect the object of class B as I can directly
make a B class object.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by global variables?

804


What are the advantages of inheritance in c++?

842


What do you mean by ‘void’ return type?

807


What is the use of class in c++?

758


Describe exception handling concept with an example?

746


What is a block in c++?

765


What is an operator in c++?

789


Why is the function main() special?

834


What is the sequence of destruction of local objects?

708


Explain deep copy?

782


Why do we use classes in c++?

788


Where must the declaration of a friend function appear?

719


List the special characteristics of constructor.

911


Explain the use of vtable.

812


Why do we use constructor?

804