S
Steve555
I have a map with integer keys.
How do I loop through with an iterator so that I start with an iter
that corresponds to a key >= x?
(i.e. in the loop I only want to operate on elements with a key >= x)
myMapType::iterator iter, startIter = iter starting with x ???;
for(iter = startIter; iter != myMap.end(); ++iter)
{
....
}
Is this possible or do I just have to start from myMap.begin() and
check each key?
I can't use advance() as the keys aren't contiguous
Thanks
Steve
How do I loop through with an iterator so that I start with an iter
that corresponds to a key >= x?
(i.e. in the loop I only want to operate on elements with a key >= x)
myMapType::iterator iter, startIter = iter starting with x ???;
for(iter = startIter; iter != myMap.end(); ++iter)
{
....
}
Is this possible or do I just have to start from myMap.begin() and
check each key?
I can't use advance() as the keys aren't contiguous
Thanks
Steve