| Report

How to search STL vector for specific element value? Do I have to use foreach?

Topics: c++
Discussion
| Report
Use STL find():

#include <vector>
#include <algorithm>
elm = find(vect.begin(), vect.end(), val);
 Anonym
No regstration needed to add reply
Insert: Picture