I have a c++ vector of student objects with each object having an ID(string), name (string) and age(int).
std::vector<student> myVector;
Lets say the vector looks like this
[{"1", "Tom", 12}, {"2", "David", 10}, {"3", "Adam", 15}, {"4", "Jill", 20}]
Is there any way I can delete an object in the vector using the student Name like:
myVector.deleteObjectWithName(David)
such that my remaining vector is now
[{"1", "Tom", 12}, {"3", "Adam", 15}, {"4", "Jill", 20}]