In file included from /in/DoubleDeckerBus.cpp:1:0:
/in/compile/DoubleDeckerBus.h: In constructor 'DoubleDeckerBus::DoubleDeckerBus(int, int)':
/in/compile/DoubleDeckerBus.h:35:9: error: 'DoubleDeckerBus::passengerNumMax2' will be initialized after [-Werror=reorder]
int passengerNumMax2;
^~~~~~~~~~~~~~~~
/in/compile/DoubleDeckerBus.h:32:9: error: 'int DoubleDeckerBus::passengerNum2' [-Werror=reorder]
int passengerNum2;
^~~~~~~~~~~~~
/in/DoubleDeckerBus.cpp:4:1: error: when initialized here [-Werror=reorder]
DoubleDeckerBus::DoubleDeckerBus(int passengerNumMax, int passengerNumMax2)
^~~~~~~~~~~~~~~
/in/DoubleDeckerBus.cpp: At global scope:
/in/DoubleDeckerBus.cpp:7:6: error: prototype for 'void DoubleDeckerBus::print() const' does not match any in class 'DoubleDeckerBus'
void DoubleDeckerBus::print() const {
^~~~~~~~~~~~~~~
In file included from /in/DoubleDeckerBus.cpp:1:0:
/in/compile/DoubleDeckerBus.h:19:10: error: candidate is: virtual void DoubleDeckerBus::print()
void print();
^~~~~
/in/DoubleDeckerBus.cpp:12:5: error: prototype for 'int DoubleDeckerBus::getPassengerNum2() const' does not match any in class 'DoubleDeckerBus'
int DoubleDeckerBus::getPassengerNum2() const {
^~~~~~~~~~~~~~~
In file included from /in/DoubleDeckerBus.cpp:1:0:
/in/compile/DoubleDeckerBus.h:21:9: error: candidate is: int DoubleDeckerBus::getPassengerNum2()
int getPassengerNum2() { return passengerNum2; }
^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors