what’s the alternative?
Should I write by myself?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is the
std::find()algorithm, which performs a linear search over an iterator range, e.g.,If your vector is sorted, you can use
std::binary_search()to test whether a value is present in the vector, andstd::equal_range()to get begin and end iterators to the range of elements in the vector that have that value.