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
Is c++ fully object oriented?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Who discovered c++?
Is dev c++ free?
What is the real purpose of class – to export data?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
Which programming language's unsatisfactory performance led to the discovery of c++?
What are references in c++?
How many static variables are created if you put one static member into a template class definition?
Why do you use the namespace feature?
What are inline functions? What is the syntax for defining an inline function?
How many different levels of pointers are there?
If I is an integer variable, which is faster ++i or i++?
Is c++ a difficult language?
program explaining feautures of c++