title: Cout Overload Operating for multiple inheritance
body: <p>I have 4 classes, Vehicle, PassengerVehicle, CargoVehicle, and CrewHauler. I will draw a diagram and put data members inside the parenthesizes.</p>
  
  <pre><code>                                 Vehicle
                              (model, brand, year)
                          /                         \
                         /                           \
  (model, brand, year, doors, seats)          (model, brand, year, capacity)
             PassengerVehicle                           CargoVehicle
                          \                         /
                           \                       /
                                   CrewHauler
                    (model, brand, year, doors, seats, capacity)
  </code></pre>
  
  <p>Everything works out fine. But when I try to write the overload operator "cout &lt;&lt;" for CrewHauler, it keeps saying that "the object has type qualifier that are not compatible with the member function "passengerVehicle::getDoors"" and underlines <em>CrewHauler</em>.getDoors() as well as <em>CrewHauler</em>.getSeats().
  <strong>How should I fix it?</strong>
  Here is my code:</p>
  
  <pre><code>
  using namespace std;
  
  CrewHauler::CrewHauler(std::string brand, std::string model, int year, 
                         int doors, int seats, double capacity) : 
                         passengerVehicle(brand, model, year, doors, seats), 
                         cargoVehicle(brand, model, year, capacity)
  {
  }
  
  std::ostream&amp; operator&lt;&lt;(std::ostream&amp; output, const CrewHauler&amp; CrewHauler)
  {
      output &lt;&lt; "------- CrewHauler -------" &lt;&lt; endl
          &lt;&lt; "Brand: " &lt;&lt; CrewHauler.Vehicle::getBrand() &lt;&lt; endl
          &lt;&lt; "Model: " &lt;&lt; CrewHauler.Vehicle::getModel() &lt;&lt; endl
          &lt;&lt; "Year: " &lt;&lt; CrewHauler.Vehicle::getYear() &lt;&lt; endl 
          &lt;&lt; "Doors:" &lt;&lt; CrewHauler.getDoors() &lt;&lt; endl
          &lt;&lt; "Seats:" &lt;&lt; CrewHauler.getSeats() &lt;&lt; endl;
      return output;
  }
  </code></pre>