A virtual function is a base class member function that we expect to redefine in derived classes.
In the base class, a virtual function is used to ensure that the function is overridden.
This is especially true when a pointer from a base class points to an object from a derived class.
For example, consider the code below:
class Base ...READ MORE
May 27, 2022
in Others
by
Damon
• 4,960 points
•
1,439 views