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

an integer constant must have atleast one a) character b) digit c) decimal point

1031


What is a v-table?

1185


What is polymorphism & list its types in c++?

1066


What is a manipulative person?

1021


What are all predefined data types in c++?

1131


What does it mean to declare a member variable as static?

1059


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1230


How many standards of c++ are there?

1101


What is double in c++?

1072


What is insertion sorting?

1113


Is c++ a programming language?

1081


How do you print a string on the printer?

1040


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

2195


What are the implicit member functions of class?

1091


What is the keyword auto for?

1041