vectoe has find code example
Example 1: if vector contains value c++
#include <algorithm>
if(std::find(v.begin(), v.end(), x) != v.end()) {
/* v contains x */
} else {
/* v does not contain x */
}
Example 2: c++ find element in vector
auto it = find(vec.begin(),vec,end(), item)!
if(it != vec.end()){
int index = it - vec.begin();
}