
23 Mar
2009
23 Mar
'09
1:24 p.m.
Steven Watanabe skrev:
AMDG
Archie14 wrote:
ptr_vector<A> lst;
When I need to erase element from this container - should I just do A* el; iterator it = std::find (lst.begin(), lst.end(), el); lst.erase(it);
Replace "A* el" with "A el". Objects are compared not by their pointer value, but by the paointee. -Thorsten