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 |
How much is c++ certification?
Comment on c++ standard exceptions?
Which programming language is best?
Is structure can be inherited?
What are disadvantages of pointers?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
Describe linkages and types of linkages?
Why do we use setw in c++?
What is isdigit c++?
what is importance of data sturture in a programming language?
22 Answers L&T, TCS, Wipro,
What is the best it certification?