Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why is object oriented programming so hard?

1089


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2465


What is polymorphism and example?

1055


What is interface in oop?

1133


What is the highest level of cohesion?

1053


What is the important feature of inheritance?

1143


What does it mean when someone says I oop?

1063


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

2159


why reinterpret cast is considered dangerous?

2394


What is for loop and its syntax?

1087


How long to learn object oriented programming?

1097


Why is abstraction used?

1094


What is protected in oop?

1082


What is object in oop with example?

1249


What is ambiguity in inheritance?

1121