|You can call a class method either by using the '
.' operator on an instance of that class, e. g.
Or by using the '::' operator on the class, if it is a static method, e. g.:
I don't think either makes sense in this case however.
Your mistakes have already been pointed out, but from the information you gave us it's hard to derive what is actually needed to fix them. Looking at the declaration of
class Flight, I suspect that
reservations is supposed to be a list of, well, reservations. The prototype of
cancelReservation(string resNum) indicates that you are supposed to use a string representing the reservation number as a key for retrieving a specific reservation. So your
reservations may in fact be organized as a sorted tree - but that is something you have to find out for yourself.
In any case, the method
reserveSeat() should create a new object of type
Reservation and add it to that list. Probably you should apply these method calls on that new object in order to properly initialize it. The declaration of class
Reservation should shed more light on this.