I\'m working on a collision engine and more specifically, I am trying to make a vector of relevant bodies in the world. To be able to access a specific body in the vector of bod
After removing an element in a vector all elements after the removed element will be moved one position left. So either the pointer will point to some other element or to the deleted element if it was the last element in the vector.
If you add a new element then the vector can reallocate memory. So all pointers to the elements of the vector will be invalid.