Answers for "how to use find function with array and vector in c++"

C++
3

Using find in Vector c++

#include <algorithm>
#include <vector>
vector<int> vec; 
//can have other data types instead of int but must same datatype as item 
std::find(vec.begin(), vec.end(), item) != vec.end()
Posted by: Guest on December-04-2021

Code answers related to "how to use find function with array and vector in c++"

Browse Popular Code Answers by Language