why constructor cannt be declar virtually?
why destructor cannt be overloaded?
Answer Posted / subhashish sen
Constructor can't be virtual,becoz constructor is an entity
which initializes V-table(V-table contains addrress of all
the virtual functions of class).So if we declare constructor
as virtual the who will intialize V-table for this constructor.
Destructor can not be overloaded simply becoz we cant
provide argument to a destructor and also its going to
release the memory when an object goes out of scope.
| Is This Answer Correct ? | 20 Yes | 0 No |
Post New Answer View All Answers
How do you explain polymorphism?
Why is oop better than procedural?
What is for loop and its syntax?
What is a superclass in oop?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
Why is abstraction used?
is there any choice in opting subjects like 4 out of 7
What is encapsulation in ict?
What is encapsulation with example?
class type to basic type conversion
What type of loop is a for loop?
What is the point of polymorphism?
What is the fundamental idea of oop?
officer say me - i am offered to a smoking , then what can you say
Why do pointers exist?