I want to check for all values in an array:
// if the value (unique) is present in an array then do something
if (value == array[size])
Can this be done in one statement without having to call a function or a basic for loop statement?
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.
std::findcan do it in one statement, but it’s not as trivial as other languages 🙁Or with
std::count: