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 the real purpose of class – to export data?

1106


Define basic type of variable used for a different condition in C++?

1101


What are the various storage classes in C++?

1132


What does new return if there is insufficient memory to make your new object?

1023


What are mutator methods in c++?

1158


Why do we need runtime polymorphism in c++?

1015


What is near, far and huge pointers? How many bytes are occupied by them?

1115


Is C++ case sensitive a) False b) Depends on implementation c) True

1070


Is it possible to provide special behavior for one instance of a template but not for other instances?

1128


Which software is best for c++ programming?

1046


What is using namespace std in cpp?

1146


Show the declaration for a static member variable.

992


What is the difference between equal to (==) and assignment operator (=)?

1062


Is c++ low level?

1029


Is linux written in c or c++?

1043