prog.cpp: In member function ‘void Route::input()’:
prog.cpp:116:37: error: no match for call to ‘(passenger) (int&, std::__cxx11::string&, std::__cxx11::string&, bool&)’
student(money,from,to,health);
^
prog.cpp:119:23: error: no match for call to ‘(conductor) (bool&, int&)’
c(health,money);
^
prog.cpp:122:24: error: no match for call to ‘(driver) (bool&, bool&)’
d(health,safety);
^
prog.cpp: In member function ‘void Route::route()’:
prog.cpp:129:36: error: request for member ‘size’ in ‘((Route*)this)->Route::BusStop’, which is of non-class type ‘std::__cxx11::string [7]’ {aka ‘std::__cxx11::basic_string<char> [7]’}
for(int i=0; i<BusStop.size(); i++)
^~~~
prog.cpp:135:29: error: ‘bool passenger::inBus’ is private within this context
student.inBus();
^~~~~
prog.cpp:7:16: note: declared private here
bool inBus=false, h, isNecB=true, paid=false;
^~~~~
prog.cpp:135:29: note: field ‘bool passenger::inBus’ can be accessed via ‘bool passenger::state()’
student.inBus();
^~~~~
state()
prog.cpp:135:35: error: expression cannot be used as a function
student.inBus();
^
prog.cpp:151:33: error: ‘bool passenger::inBus’ is private within this context
else if(student.inBus()&&BusStop[i]==student.To())
^~~~~
prog.cpp:7:16: note: declared private here
bool inBus=false, h, isNecB=true, paid=false;
^~~~~
prog.cpp:151:33: note: field ‘bool passenger::inBus’ can be accessed via ‘bool passenger::state()’
else if(student.inBus()&&BusStop[i]==student.To())
^~~~~
state()
prog.cpp:151:39: error: expression cannot be used as a function
else if(student.inBus()&&BusStop[i]==student.To())
^
prog.cpp: In function ‘int main()’:
prog.cpp:163:11: error: use of deleted function ‘Route::Route()’
Route obj;
^~~
prog.cpp:101:7: note: ‘Route::Route()’ is implicitly deleted because the default definition would be ill-formed:
class Route{
^~~~~
prog.cpp:101:7: error: no matching function for call to ‘passenger::passenger()’
prog.cpp:9:5: note: candidate: ‘passenger::passenger(int, std::__cxx11::string, std::__cxx11::string, bool)’
passenger(int money, string _from, string _to, bool health)
^~~~~~~~~
prog.cpp:9:5: note: candidate expects 4 arguments, 0 provided
prog.cpp:3:7: note: candidate: ‘passenger::passenger(const passenger&)’
class passenger{
^~~~~~~~~
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: candidate: ‘passenger::passenger(passenger&&)’
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:101:7: error: no matching function for call to ‘conductor::conductor()’
class Route{
^~~~~
prog.cpp:67:5: note: candidate: ‘conductor::conductor(bool, int)’
conductor(bool health, int money)
^~~~~~~~~
prog.cpp:67:5: note: candidate expects 2 arguments, 0 provided
prog.cpp:62:7: note: candidate: ‘constexpr conductor::conductor(const conductor&)’
class conductor{
^~~~~~~~~
prog.cpp:62:7: note: candidate expects 1 argument, 0 provided
prog.cpp:62:7: note: candidate: ‘constexpr conductor::conductor(conductor&&)’
prog.cpp:62:7: note: candidate expects 1 argument, 0 provided
prog.cpp:101:7: error: no matching function for call to ‘driver::driver()’
class Route{
^~~~~
prog.cpp:86:5: note: candidate: ‘driver::driver(bool, bool)’
driver(bool health, bool safety)
^~~~~~
prog.cpp:86:5: note: candidate expects 2 arguments, 0 provided
prog.cpp:82:7: note: candidate: ‘constexpr driver::driver(const driver&)’
class driver{
^~~~~~
prog.cpp:82:7: note: candidate expects 1 argument, 0 provided
prog.cpp:82:7: note: candidate: ‘constexpr driver::driver(driver&&)’
prog.cpp:82:7: note: candidate expects 1 argument, 0 provided