Getting Rid of the Error Message
Kindly replace line
main.cpp(505): buses[0].set_driver(Driver* &drivers[0],Driver* &drivers[1]);
with
main.cpp(505): buses[0].set_driver(&drivers[0],&drivers[1]);
Hello Ikarus! :)
So I looked into your data file and the manufacturer of your first bus is Ikarus from Hungary. First time I saw anyone from outside of Hungary knowing about these busses. Heart warming. :)
I'm Confused
After you get rid of the error message as suggested above your code still wouldn't compile. It's still line 505, the compiler cannot find a matching set_driver function.
So it got me thinking... Your code involves some "crazy" template to add multiple drivers to the bus (crazy for me, as I don't really work with C++, so these things do not come naturally to me). You also use const for your constant functions. So these are not a sign of someone who just recently started to do C++.
On the other hand, you do not get your indentations right all the time, you do not use constructor to set the values of your classes (, you can have inherited Driver from Staff), you only log if a file cannot be opened, regardless, in these cases you go on with trying to read from them and closing the file (which doesn't seem to cause any problem apparently, but totally unnecessary). Misleading names (such as set_driver is used which does not set the driver, rather adds the driver to the vector of drivers, so add_driver would have been a proper name; or arrays typically suggest multiple: instead of driver, you should call your vector<Driver*> in Vehicle class as drivers.) And of course, you cannot see just by looking at line 505 what "Driver *" makes no sense there are all (it's not a cast, as missing the parenthesis, nor is driver any known variable so the * operator couldn't be applied).
These are a signs of someone who is new or has not much experience in C++.
It's like the code is written by multiple people with various level of understanding of C++.
Full Fix
Please, see the fix below so your code can run. The fix is to add drivers one-by-one to the busses. If you do want to keep the "template magic" feel free to experiment with it or do some research on your own; I am not familiar with them so I did the "old-school" implementation of adding elements one at a time. (One could create a function overload where a vector<Driver*> is taken as an argument, if adding multiple drivers is indeed needed.)
Legend:
void set_driver() {}
template<typename T, typename... Args>
void set_driver(Driver* driver, Args... args) {
driver_.push_back(driver);
set_driver(args...);
}
void add_driver(Driver* driver) {
driver_.push_back(driver);
}
buses[0].set_driver(Driver* &drivers[0],Driver* &drivers[1]);
buses[0].add_driver(&drivers[0]);