So I'm making a simple shooter game and I want to remove an element from my vector when it gets killed, my question is what is the best way to do it?
I've worked out that I can delete an object no problem using the Vector.erase (Vector.begin () + Collided); method where Collided is the index of the object I want to remove. However would this leave a big gaps in memory? I use the vector.size () functions to work out how many objects I should check for collisions so will this be reduced when i kill of one of my units?
Is this the best way to store the information about my units?