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
Why do we use class?
What is the diamond problem in inheritance?
What are the 4 pillars of oop?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
What are main features of oop?
What are properties in oop?
What is encapsulation in ict?
write knight tour problem which is present in datastructure
Can static class have constructor?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< Write a program to sort the number with different sorts in
one program ??
What is the real time example of encapsulation? What is class encapsulation? What are the 3 principles of oop? What are the 3 pillars of oop?