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 an accessor in c++?
How do you remove an element from a set in c++?
What is the outcome of cout< a) 16 b) 17 c) 16.5
What do you understand by zombie objects in c++?
What are arrays c++?
What is the use of typedef?
Write a code/algo to find the frequency of each element in an array?
Difference between pointer to constant and constant pointer to a constant. Give example.
Is map ordered c++?
Is c better than c++?
Can a built-in function be recursive?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
What is an overflow error?
What is purpose of abstract class?
Explain the static member function.