What is a 'pure' virtual function and what's its use?
Answer / 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 |
What are the advantages of prototyping?
Can you explicitly call a destructor on a local variable?
Will this c++ program execute or not?
Write a function which takes a character array as input and reverses it in place.
2 Answers Lehman Brothers, Vision Infotech,
Why do we use using namespace std in c++?
What are the five basic elements of a c++ program?
Is there something that we can do in C and not in C++?
Why do we use structure in c++?
what is oops and list its features in c++?
Explain this pointer?
write the programme that convert a interger to biniry number
Search for: what is pair in c++?