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...

what is virtual destructor

Answer Posted / suresh.k (portblair)

Using virtual destructors, you can destroy objects without
knowing their type - the correct destructor for the object
is invoked using the virtual function mechanism. Note that
destructors can also be declared as pure virtual functions
for abstract classes.

if someone will derive from your class, and if someone will
say "new Derived", where "Derived" is derived from your
class, and if someone will say delete p, where the actual
object's type is "Derived" but the pointer p's type is your
class.

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation oop?

994


How do you use inheritance in unity?

1025


How oops is better than procedural?

1027


What is the full form of oops?

1121


What is a class and object?

1002


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1571


What is coupling in oops?

1066


Why do we use inheritance?

1061


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4678


What is data binding in oops?

1024


What is encapsulation c#?

1013


What is polymorphism used for?

1015


What is super in oop?

1088


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1869


What is a class oop?

956