Here I am trying to make a subclass of the base class, Airplane. In my main code I haven\'t tried to use either constructor yet as I am just trying to make sure I can make t
The error contains the information that you need. You havent defined a default constructor for class Airplane. When you construct the child class Fighter in this function:
Fighter(int, int, string);
There will be a call to construct the base class. In your implementation you do not explicitly call the base class constructor:
Airplane::Airplane(int engines, int seats)
And you have no default constructor, so what should the compiler do? It complains.
You wiether need to define a default constructor:
Airplane::Airplane()
Or call an existing constructor in the constructor for fighter:
Fighter::Fighter(int engines, int seats, string desc) : Airplane(engines, seats)