Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ find element in vector

auto it = find(vec.begin(),vec,end(), item)!
if(it != vec.end()){
 	 int index = it - vec.begin();
}
 
PREVIOUS NEXT
Tagged: #find #element #vector
ADD COMMENT
Topic
Name
4+6 =