It es un iterador de un vector.
Ya corregí el error, estaba usando un vector y en realidad tenía que usar una lista. Estaba buscando diferencias y resulta que por estar todo el tiempo generando nuevas balas y eliminando encontré esto:
Lists are faster when you regularly need to insert elements in between two other elements, or delete elements from such positions though. Insertions and erasures are cheap no matter where in the list they occur. Iterators remain valid even when you add or remove elements from the list.
Así que simplemente cambié de un vector a una lista y funcionó. Escribo esto por si a alguien se le presenta lo mismo.
Pero gracias por responder igual.
Ya corregí el error, estaba usando un vector y en realidad tenía que usar una lista. Estaba buscando diferencias y resulta que por estar todo el tiempo generando nuevas balas y eliminando encontré esto:
Lists are faster when you regularly need to insert elements in between two other elements, or delete elements from such positions though. Insertions and erasures are cheap no matter where in the list they occur. Iterators remain valid even when you add or remove elements from the list.
Así que simplemente cambié de un vector a una lista y funcionó. Escribo esto por si a alguien se le presenta lo mismo.
Pero gracias por responder igual.
