What is Pure Virtual Function? Why and when it is used ?
Answer Posted / prajesh gupta (ferozepur, punj
Pure Virtual Functions:
1. "Do nothing Function"
virtual void display() = 0;
2. declared in base class.
3. class containing a pure virtual function does not
declare an object of its own. (That class is known as
ABSTRACT CLASS)
Advantages Of Using:
1. To inherit the properties of the derived class.
2. To create a base pointer required for runtime
poymorphism.
3. To avoid overwriting of member function.
| Is This Answer Correct ? | 37 Yes | 11 No |
Post New Answer View All Answers
Explain the operation of overloading of an assignment operator.
What is c++ best used for?
Difference between a homogeneous and a heterogeneous container
Is python written in c or c++?
What is meaning of in c++?
What does the ios::ate argument do?
What does new do in c++?
Is c++ primer good for beginners?
Where the memory to the static variables is allocated?
Is it possible for the objects to read and write themselves?
How long will it take to learn programming?
Which software is used to run c++ program?
What is decltype c++?
What is the difference between multiple and multilevel inheritance in c++?
Why do we use classes in programming?