L
laniik
Hi. I have a STL vector of some relativly complicated objects
I was wondering if there was a good way to remove objects from the
middle of the vector.
Currently the only way I know how to remove element i is:
1. set the contents of the object at index i to the contents of the
last object
2. vector.pop_back();
but this is obviously annoying if my objects are not just simple
structs.
Thanks!
Oliver
I was wondering if there was a good way to remove objects from the
middle of the vector.
Currently the only way I know how to remove element i is:
1. set the contents of the object at index i to the contents of the
last object
2. vector.pop_back();
but this is obviously annoying if my objects are not just simple
structs.
Thanks!
Oliver