No matching member function for call to ‘push_back’ error
The error is because of the declaration: The vector contains pointers to mutable ships, but the code passes a pointer to a const ship to push_back. You either need to store const pointers in the vector: Or pass a non const pointer to the push_back: Side note: move the above function to a cpp, move it … Read more