I am using an object as a key for a multimap. The object is a custom date class which I created. I was just wondering if it is possible to use a variable found in the object for equal_range()?
That is check against the month variable in my custom date object.
That is something like this (pseudo code).
int january = 1;
foundValues = myMultimap.equal_range(january);
for (it=foundValues.first; it!=foundValues.second; ++it)
{
cout << " " << (*it).second;
cout << endl;
}
Will this go through each key object and check if the variable inside that object is equal to "january", then return the value paired to the key?
Thank you.