   Any algorithm to find value of a datamember from a class in a vector?
  I have a vector of sprites, each sprite has a pointer to a body (that is handled by the physics engine). I have done a conditional loop using the physics engine, to decide if i should destroy the body, so i have an iterator to the body, but i need to also find the sprite with the pointer to this body. Is there an algorithm for doing that? i was thinking of find() at first. I know that each sprite has its  uniqe body.   
  Could you give the body a pointer to its sprite?   ;  A back pointer would work. Sending a signal to the sprite would also work, how does the physics engine update the sprite when something changes?   ;  Ahh, a back pointer :D thanks guys!   ;  If I understand you correctly, you're probably best off, in this case, using the address of the iterator to the body (ie: &(*iter) ) and manually looping through your sprite vector looking for that value.I believe (and someone is sure to correct me if I'm wrong :) ) that find is going to look for values of the vector's type.  If the sprite IS the pointer to the body then you can use the aforementioned address and the find algorithm to search your vector for that value.  I would guess, however, that your sprite is a more complicated object.  In that case find isn't going to work with the pointer to your body unless you override the == operator on your sprite class to comapre a sprite object with a body pointer (which might be more work than it's worth). 