Question: What is Pure Virtual Function? Why and when it is used ?
Answer: The
abstract class whose pure virtual method has to be implemented by all the
classes which derive on these. Otherwise it would result in a compilation
error.
This construct should be used when one wants to ensure that all the derived classes implement the method defined as pure virtual in base class.
This construct should be used when one wants to ensure that all the derived classes implement the method defined as pure virtual in base class.
No comments:
Post a Comment