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 is it so that we can have virtual constructors but we
cannot have virtual destructors?

Answer Posted / sachinmundhra

vptr gets initialize in constructor. So in that case we
cannot have virtual constructor.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between encapsulation and polymorphism?

1053


Why do we use class?

1036


what is different between oops and c++

2464


What are the three main types of variables?

1072


What is the problem with multiple inheritance?

1105


How Do you Code Composition and Aggregation in C++ ?

25294


what are the realtime excercises in C++?

2795


What is the fundamental idea of oop?

1090


What are the important components of cohesion?

975


What is overloading and its types?

1097


What are functions in oop?

1006


What polymorphism means?

1007


Whats is abstraction in oops?

1028


explain sub-type and sub class? atleast u have differ it into 4 points?

2271


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

1258