Find with Iterators template typename vector::const_iterator find(const vector &v, const T &value) { typename vector::const_iterator b = v.begin(), e = v.end(); while ( (b != e) && (*b != value) ) ++b; return b; }