23 Feb
2006
23 Feb
'06
1:24 a.m.
yinglcs2@yahoo.com wrote:
Thanks. I would like to use your suggestion (since it is simpler/cleaner).
however, you said 'you just need to proceed from the iterator lower_bound returns until you hit an element with .first != x (or end()). '
How can I find the element with .first != x?
I try using end(), but it does not work. it copies evething from (.fires == x) to the end of the list.
Should be something like (untested): for( iterator it = m.lower_bound( make_pair( x, INT_MIN ) ); it != m.end() && it->first.first == x; ++it ) { // do something with *it }