adjacent_find example int main() { list l; // fill values... list::iterator i = adjacent_find(l.begin(), l.end()); if (i != l.end()) cout << "first repeated num: " << *i << endl; }