Why pure virtual functions are used if they don't have implementation / When does a pure virtual function become useful?
Answer Posted / hrpynux@gmail.com
A pure virtual function makes it so the base class can not be instantiated, and the derived classes are forced to define these functions before they can be instantiated. This helps ensure the derived classes do not forget to redefine functions that the base class was expecting them to.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which is the best c++ software?
What is the difference between c++ and turbo c++?
In a function declaration what does extern means?
Can you please explain the difference between using macro and inline functions?
What are the main features of c++?
Do you know what are static and dynamic type checking?
What is #include iostream?
Is c++ a programming language?
What is == in programming?
What is void pointer in c++ with example?
Write a program to interchange 2 variables without using the third one.
Do the names of parameters have to agree in the prototype, definition, and call to the function?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
How do you master coding?
Which c++ operator cannot overload?