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
Difference between declaration and definition of a variable.
What is a stack? How it can be implemented?
What is microsoft c++ redistributable?
How to tokenize a string in c++?
Write a function to find the nth item from the end of a linked list in a single pass.
Distinguish between a # include and #define.
How is computer programming useful in real life?
Is c++ a low level language?
What gives the current position of the put pointer?
What are multiple inheritances (virtual inheritance)?
Can static member variables be private?
Write about the various sections of the executable image?
What is the full form of ios?
Do inline functions improve performance?
Describe private, protected and public?