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

Anonym2691308/23/2007 10:21 AM Report

Answers

Add a answer ▾

Discussion

Anonym2698108/23/2007 11:39 PM Report
Use STL find():

#include <vector>
#include <algorithm>
elm = find(vect.begin(), vect.end(), val);
Add a question comment ▾