H
Howard
Hi all,
is there an easy way to swap one pointer item in a vector with a pointer
that's not yet in the vector?
Currently, I'm using begin()+index to get an iterator to the item I want
to swap out, then deleting the pointer there, then using erase to get rid of
the vector item itself and get an iterator to the next item, and finally
using insert to put my new pointer in the correct place. Is there an easier
way?
Thanks,
-Howard
is there an easy way to swap one pointer item in a vector with a pointer
that's not yet in the vector?
Currently, I'm using begin()+index to get an iterator to the item I want
to swap out, then deleting the pointer there, then using erase to get rid of
the vector item itself and get an iterator to the next item, and finally
using insert to put my new pointer in the correct place. Is there an easier
way?
Thanks,
-Howard