About the last example where we need to find all elements with key value greater than 10

how to get all the elements ?

hello @Senjuti256
store all the elements in multiset .
then find lower bound of 10 in that multiset.
and then print distance( mutset.end(), iterator of lower bound of 10)

pls can you tell once more I did not understand

@Senjuti256

lower bound of 10 will give u iterator of number which is greater than or equal to 10.

upper bound of 77 will give u iterator of number which is greater than 77.

now using loop we are iterating from lower bound iterator to upper bound iterator and printing all the elements in between them [10…77]

what is the mutset.end() function?

it will give u iterator that will point to end of the container

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.