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 Pure Virtual Function? Why and when it is used ?

Answer Posted / shakti singh

A virtual function in a base class which is equated to 0 is called a pure virtual function.The class then is called a Abstract Base Class or in general ABC.No object of such class can be instantiated.ABC in general acts as an interface and implement the general flow of algorithm.A pure virtual function must be overloaded in the derived class otherwise the compiler will throw an error.
A pure virtual function do nothing and it is not concerned with the implementation detail.

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the extension of c++?

939


What is enum c++?

1165


What is a float in c++?

942


Is c++ slower than c?

995


What is setiosflags c++?

922


Can we run c program in turbo c++?

1050


What is an accessor in c++?

1038


How do you add an element to a set in c++?

949


What is pointer with example?

994


Is the declaration of a class its interface or its implementation?

1137


Describe friend function & its advantages.

1104


Why the usage of pointers in C++ is not recommended ?

1374


How many static variables are created if you put one static member into a template class definition?

992


What is a namespace in c++?

1949


What is namespace & why it is used in c++?

1058