41 typedef std::vector<int, std::allocator<int> >
Vector;
43 const Vector::value_type arr[] = { 0, 1, 2, 2, 3, 4, 2, 2, 6, 7 };
46 const Vector v1 (arr, arr +
sizeof arr /
sizeof *arr);
49 Vector::const_iterator it = std::find (
v1.begin (),
v1.end (), 3);
51 std::cout << *it <<
' ';
54 it = std::find_if (
v1.begin (),
v1.end (),
55 std::bind1st (std::equal_to<Vector::value_type>(), 3));
57 std::cout << *it <<
' ';
60 it = std::adjacent_find (
v1.begin (),
v1.end ());
62 std::cout << *it <<
' ';
64 it = std::adjacent_find (
v1.begin (),
v1.end (),
65 std::equal_to<Vector::value_type>());
67 std::cout << *it << std::endl;
std::vector< UserClass, std::allocator< UserClass > > Vector