## 18.3.4 Field Initializer Lists (cont.)

- Necessary to invoke base-class c'tors; otherwise, the base-class' default c'tor will be called:

  >     class TeachingAssistant : public Employee
  >     public:
  >        TeachingAssistant(String student_name);
  >     };

  >     TeachingAssistant::TeachingAssistant(String student_name)
  >        // Teaching assistants all get same starting salary
  >        : Employee(student_name, 5000)
  >     {
  >     }

prev |top |next