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

How can virtual functions in c++ be implemented?

1083


Explain the concept of dynamic allocation of memory?

1067


What is malloc in c++?

985


What is the difference between the indirection operator and the address of oper-ator?

1073


What is binary object model?

983


What do you mean by inheritance in c++? Explain its types.

1094


What is else if syntax?

1125


Why cstdlib is used in c++?

1007


Describe friend function & its advantages.

1113


What do the keywords volatile and mean mutable?

1027


What are the general quetions are in DEna bank manager IT/System interviews?

1986


Who calls main function?

1073


an operation between an integer and real always yeilds a) integer result b) real result c) float result

1136


What are the sizes and ranges of the basic c++ data types?

1010


What is set in c++?

1092