Answer Posted / subhashish sen
Hi Priyanka Kokil,
What ever u have answered its not 100% correct..As we know
for every virtual function in a class one VTABLE is created
internally and constuctor is an entity who intializes this
VTABLE for all virtual functions of a class.For example if
we have a base class and a derived class derived from
it,then 2 VTABLE will be created one for base and one for
derived class.So if you make constructor as virtual then
who will create VTABLE for this constructor.Thats why
constructor can never be virtual.
Thanks!!!!!If u have ny suggession plz reply..
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
How can I learn c++ easily?
Do we have to use initialization list in spite of the assignment in constructors?
Define macro.
What kind of problems can be solved by a namespace?
Can user-defined object be declared as static data member of another class?
Is there structure in c++?
What is implicit conversion/coercion in c++?
Why c++ is created?
What is command line arguments in C++? What are its uses? Where we have to use this?
What is c++ runtime?
Explain all the C++ concepts using examples.
Is c++ platform dependent?
How do I run c++?
Who calls main function?
What is the difference between structure and class?