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
What is the difference between cin.read() and cin.getline()?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
Do we have to use initialization list in spite of the assignment in constructors?
You run a shell on unix system. How would you tell which shell are you running?
What do you mean by funtion prototype?
Explain container class.
What is class syntax c++?
Do the parentheses after the type name make a difference with new?
Do vectors start at 0 c++?
How much do coding jobs pay?
How does a C++ structure differ from a C++ class?
Why is c++ called oops?
Can we distribute function templates and class templates in object libraries?
What is the use of setprecision in c++?
When is dynamic checking necessary?