To find the second 4, you must increment the position of the first 4. However, incrementing the
end() of a collection results in undefined behavior. Thus, if you are not sure, you should check the
return value of find() before you increment it. The program has the following output:
coll: 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
4 5 6 7 8 9 1 2 3 4
You can call find() twice for the same range but with two different values. However, you have to
be careful to use the results as the beginning and the end of a subrange of elements; otherwise, the
subrange might not be valid. See Section 6.4.1, page 203, for a discussion of possible problems and
for an example.
The following example demonstrates how to use find_if() and find_if_not() to find elements
according to very different search criteria