How do you check that an element is in a set?

Is there a simpler equivalent of the following code:

myset.find(x) != myset.end()

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *