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 is oop in c++?
What is singleton pattern in c++?
What is the use of c++ programming language in real life?
What is ios class in c++?
What is token c++?
When are exception objects created?
Is c++ pass by reference or value?
Where are setjmp and longjmp used in c++?
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
What is object in c++ wikipedia?
Who was the creator of c++?