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 a 'pure' virtual function and what's its use?

Answer Posted / phool chand

A pure virtual function is signified by using `=0;' in place of the body of the function. The presence of a pure virtual function prevents instantiation of the class which contains it. For this to be of any use, a derived class must implement the pure virtual function. I.e. the derived class must provide a function with the same name which includes a function body.

The basic reason for pure virtual functions is to specify something that a class can do without specifying how the class will do it.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are libraries in c++?

1020


Define macro.

1031


How is data hiding achieved in c++?

1029


How many characters are recognized by ANSI C++?

1361


Which operator cannot be overloaded c++?

969


What are the steps in the development cycle?

1037


Describe linked list using C++ with an example.

1028


Which bitwise operator is used to check whether a particular bit is on or off?

1013


What is vector string in c++?

1038


Why c++ is the best language?

1009


What is singleton class in c++?

988


What do you mean by function overriding & function overloading in c++?

1102


What is a v-table?

1105


What is scope in c++ with example?

1048


What are the two types of polymorphism?

1062