|PrintMe2 Class||printmult.h||PrintMeLots2 Class|
The colon construct after the constructor is called an initializer list. (In general, it can hold several things.) This is how you call the base class constructor in C++, which does not have super. The initializer list is executed before the body of the constructor, which guarantees that the base class part of the derived class has been constructed before the derived class constructor runs. An initializer list is required if the base class does not have a default (zero-argument) constructor.
Finally, the derived class uses the base class name and the :: operator to call a method of the base class. This is only necessary when the derived class overrides the function.
|PrintMe2 Class||PrintMeLots2 Class|