I am trying to do a Z-Index reordering of videoObjects stored in a vector. The plan is to identify the videoObject which is going to b
videoObjects
vector
videoObject
You cannot delete while iterating over the list because the iterator gets invalid. You should use the return iterator of Erase to set it to your current iterator.