I have a problem and I would like to know how to solve it. I am having a struct where the struct takes 4 inputs. 3 of these inputs are arrays of size 2. The struct itself is of a variable size "newsize" as you can see. I am changing the value of "newsize" with a for loop but the problem if the size is updated the data from the previous step vanish because I am reinitializing the size of struct. Any help how to increase the size of the struct with each iteration while keeping the data from the previous iteration
vector<coordinates> vector_of_coordinates; // make a vector of coordinates
vector_of_coordinates.push_back(some_coordinates_object); // do this until you've made all the coordinate objects you're gong to make