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 pure virtual functions are used if they don't have implementation / When does a pure virtual function become useful?

Answer Posted / hrpynux@gmail.com

A pure virtual function makes it so the base class can not be instantiated, and the derived classes are forced to define these functions before they can be instantiated. This helps ensure the derived classes do not forget to redefine functions that the base class was expecting them to.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include iomanip?

1063


Which programming language should I learn first?

1151


What is helper in c++?

1148


How a modifier is similar to mutator?

1239


How important is c++?

1034


What is new in c++?

1153


What is ios in c++?

1261


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

1101


If a header file is included twice by mistake in the program, will it give any error?

1105


What is java and c++?

1226


Can we make copy constructor private in c++?

1094


How did c++ start?

1151


What are virtual constructors/destructors?

1076


What are protected members in c++?

1178


What is the difference between passing by reference and passing a reference?

1134