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
What is the benefit of c++?
What is the C-style character string?
What are the differences between java and c++?
What is the best free c++ compiler for windows?
What is a c++ object?
What are signs of manipulation?
What is the basic structure of a c++ program?
How would you use the functions randomize() and random()?
What are the two types of comments, and how do they differ?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
What are the main features of c++?
Explain the concept of dynamic allocation of memory?
How to demonstrate the use of a variable?
What are formatting flags in ios class?
What is auto used for in c++?