I have a vector of objects.
The object has an int 'id' prop, and the vector is ordered by id's
I want to find a lower_bound for 33 (in example).
And I dont know how to write the compare element...
sorry to ask again (I am not sure I can help you) but what do you mean by "lowerbound" exactly?
I guess (through googling) that you mean you want to find the first element in the sorted range [first,last) which does not compare less than value, correct?
Well the only you have to do is implement a bool function that will implement the comparison you want. Normally is operator< but I guess with a cmp you could use something else:
Thanks ultifinitus. Ths stackoverflow proposition is what I'm looking for...
What do you mean with 'I find it interesting that any question asked by anyone with more than 200 posts is generally ignored.'
Thanks any way