Is there any other method that I can solve the error without changing that Aircraft vector?
Because that vector is the skeleton code and I am not supposed to make changes to it.
class, struct is just template type, static on compile time so you must conceive such and solve it in a way of run time / dynamically, as it's vector or all dynamic containers.
initialize it by use of its constructor
@theingar:
Flight is a container that has aircrafts.
The getData() could add aircraft(s) to flight or update aircraft(s) that the flight already has.
You have to know what you want it to do.
Ignoring the classes, you have a vector:
1 2 3 4 5 6 7 8 9 10 11
std::vector<Aircraft> a;
Aircraft b;
a.push_back( b ); // add an aircraft to a
// modify every aircraft in a
for ( auto& c : a ) {
c = b;
// or
c.velocity = 3.14;
}