Home Segments Index Top Previous Next

457: Mainline

More generally, you define a virtual member function under the following circumstances:

Then, you must define a version of member_function in superclass, and you must mark that function with virtual. That member function and all versions defined in classes that are subclasses of superclass are said to be virtual member functions.