c++ inheritance constructor

  1. Create a base class with a constructor that takes a parameter.
  2. Create a derived class that inherits from the base class.
  3. In the derived class, create a constructor that takes a parameter.
  4. Inside the derived class constructor, call the base class constructor with the appropriate parameter using the constructor initialization list.