/* -*- C++ -*- */ /************************************************************************* * Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch) * * For the licensing terms see the file COPYING * ************************************************************************/ #include #include #include #include <_list.h> // problem in precompiled list class and cint #include int main() { cout << "Demonstrating generic find algorithm with " << "a list." << endl; char * s = "C++ is a better C"; int len = strlen(s); cout << "instantiate list" << endl; // list1 initialization list list1(&s[0] , &s[len]); // list::iterator where = find(list1.begin(),list1.end(), 'e'); assert(*where == 'e' && *(++where)=='t'); cout << *(--where) << *(++where) << endl; }