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 / ognas(shradha-asutosh)

in inheritance if the base class contains a virtual
function equating to zero, it is known also as do-nothing
function & that base class is called as abstract base class
as there are no instances or objects can be created by this
base class. And this pure virtual can be filled with the
codes in successiv derived classes accordin to the user
requirements.
The syntax of the pure virtual function is....

class class_name
{
visibility mode:\\should be protected:
virtual return_type function_name()=0;
}
new class_name : inheritance_type old class_name
{
........ //class body
........
}

Is This Answer Correct ?    69 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long will it take to learn programming?

1063


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

1057


What is capacity in vector in c++?

1013


What do you mean by stack unwinding in c++?

1233


What do you mean by persistent and non persistent objects?

1435


How do you define/declare constants in c++?

1054


Why do we use classes in c++?

1062


What data encapsulation is in c++?

1156


Can you declare an array without a size in c++?

1018


What is #include math h in c++?

1095


Can a Structure contain a Pointer to itself?

1142


Explain queue. How it can be implemented?

1159


What are activex and ole?

1059


Can turbo c++ run c program?

1098


Why is c++ still popular?

1053