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 best ide for c++?
Is c++ the hardest programming language?
write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.
What is else if syntax?
What is c++ virtual inheritance?
What is meant by forward referencing and when should it be used?
When are exception objects created?
Can a program run without main in c++?
What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass
How is computer programming useful in real life?
How do you decide which integer type to use?
explain the reference variable in c++?
Explain linear search.
Should I learn c or c++ first?
Is python better than c++?