template <class InputIterator, class T> InputIterator find (InputIterator first, InputIterator last, const T& val);
Returns an iterator to the first element in the range [first,last) that compares equal to val. If no such element is found, the function returns last.
vector<int> vec1{ 1, 2, 3, 4, 5, 6, 7 };
if (find(vec1.begin(), vec1.end(), 5) != vec1.end()) {
cout << "Element found in vec1" << endl;
}
else {
cout << "Element not found in myvector" << endl;
}