previous | start | next

## Derived Classes (Syntax 11.1 Derived Class Definition)

Syntax 11.1 : Derived Class Definition
    class Derived_class_name : public Base_class_name
    {   features
    };
Example: |
    class Manager : public Employee
    {
    public:
       Manager(string name, double salary, string dept);
       string get_department() const;
    private:
       string department;
    };
Purpose: | Define a class that inherits features from a base class.

previous | start | next