stormyweathers
June 22nd, 2010, 03:16 PM
Hi-
I've got a multimap problem. The key for the multimap is a class with a few data members. I've overloaded the < operator so that key look up should take all of the relevant data members into consideration.
But what I am observing is that the look up seems to not be working...i.e. it is returning keys with slightly different data members.
Also, when I call erase on the multimap and pass the key I want used to erase the values, it is deleting values that don't exactly match the key.
Is there some other operator I need to overload as well?
Thanks!
I've got a multimap problem. The key for the multimap is a class with a few data members. I've overloaded the < operator so that key look up should take all of the relevant data members into consideration.
But what I am observing is that the look up seems to not be working...i.e. it is returning keys with slightly different data members.
Also, when I call erase on the multimap and pass the key I want used to erase the values, it is deleting values that don't exactly match the key.
Is there some other operator I need to overload as well?
Thanks!