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

How do you know that your class needs a virtual destructor?

Answer Posted / guest

If your class has at least one virtual function, you should
make a destructor for this class virtual. This will allow
you to delete a dynamic object through a baller to a base
class object. If the destructor is non-virtual, then wrong
destructor will be invoked during deletion of the dynamic
object.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who created c++?

1066


What is encapsulation in C++? Give an example.

1104


What is auto type c++?

1129


Describe friend function & its advantages.

1136


What is the difference between a pointer and a link in c ++?

1057


Do the parentheses after the type name make a difference with new?

1093


Which one is a preferred language C or C++? Why?

1096


which of the following is not an secondary constant a) array b) real c) union

1806


What are c++ storage classes?

1104


What is a multimap c++?

1209


What is c++ and its features?

1018


Define whitespace in C++.

1218


Define pointers?

1058


Why can templates only be implemented in the header file?

1109


Define what is constructor?

1070