H
Henrik Goldman
Hello,
Assume we have a std::map<time_t, int>.
Now I would like to find all values (second) which fits in (within the time
range of first) between first of April 1st. and end of July. Notice that we
did not yet reach end of July yet.
Using lower_bound I can easily find the first data value within this range.
However with upper_bound I get an invalid iterator when trying to get a
future data. Ideally I would like the last record which has the highest time
value.
Maybe I should use some combination with lower_bound instead?
-- Henrik
Assume we have a std::map<time_t, int>.
Now I would like to find all values (second) which fits in (within the time
range of first) between first of April 1st. and end of July. Notice that we
did not yet reach end of July yet.
Using lower_bound I can easily find the first data value within this range.
However with upper_bound I get an invalid iterator when trying to get a
future data. Ideally I would like the last record which has the highest time
value.
Maybe I should use some combination with lower_bound instead?
-- Henrik