Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ vector element search

#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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vector #element #search
ADD COMMENT
Topic
Name
2+1 =