I'm trying to find a data structure to which structs can be added or removed based on user input of the struct name. I thought I had found something promising in vectors since vectorname.pushback(structname) will add the struct to the end of the vector by name.
However, I can't find a way to remove the struct by name. pop_back() removes the last element based on position and clear()just removes everything. Is there a way to remove an element from the middle of a vector or a better data structure to use in this scenario?