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 to implement is-a and has-a class relationships?

1010


What are pointer-to-members in C++? Give their syntax.

1127


What is encapsulation in C++? Give an example.

1080


What are manipulators used for?

1083


To what does “event-driven” refer?

1043


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

1213


How many ways can a variable be initialized into in C++?

1006


What is a tree in c++?

957


What is type of 'this' pointer? Explain when it is get created?

1009


Write a program to find the reverse Fibonacci series starting from N.

1254


What does I ++ mean in c++?

1085


Explain the use of vtable.

1069


What is pair in c++?

1057


What does the ios::ate argument do?

1166


What is the use of this pointer in c++?

999