Sorry I can't provide code bc I don't have it.
My coworker (who has been with the company for a long time but doesn't appear to know what he's doing) claims that he has to do some weird stuff to remove elements from a vector. He moves all the elements down a position (starting at the element that he wants to remove) then he'll remove the last element in the vector. This sounds OK but very inefficient. The standard library's std::vector::erase() should be able to handle this fine.
He does this because he claims that calling erase on element 0 gives random exceptions.
My question is what could cause this? I am pretty sure that this is a thread-safety problem, but is there anything else that could cause it?
Please let me know...I'm new to C++.
Again, sorry for not being able to provide code.
Thanks, Jbu