.2. 3. 4. 5. 6. 6. 7. 7. 7. 8.

Автор admin Понедельник, 1 июня 2009 11:32

.2. 3. 4. 5. 6. 6. 7. 7. 7. 8. 8. 8. 8. 11. 11. 11. 11. 11 }; const int ASZ = sizeof a / sizeof *a; vector v(a. a + ASZ); print(v.beginO. v.endO. “v”. ” “): vector: iterator it = find(v.beginO. v.endO, 4); cout « “find: ” « *it « endl; it = find_if(v.beginO. v.endO, bind2nd(greater(). 8)); cout « “find_if: ” « *it « endl; it = adjacent_find(v.begin(). v.endO); while(it != v.endO) { cout « “adjacent_find: ” « *it I « “, ” « *(it + 1) « endl; / it = adjacent_find(it + 1. v.endO): } it = adjacent_find(v.beginO. v.endO. PlusOneO); while(it != v.endO) { cout « “adjacent_find PlusOne: ” « *it « “, ” « *ot + 1) « endl: it – adjacent_find(it + 1. v.endO. PlusOneO); } int b[] = { 8. 11 }; const int BSZ = sizeof b / sizeof *b; print(b. b + BSZ. “b”. ” “): it = find_first_of(v.beginO. v.endO, b. b + BSZ): Каталог алгоритмов STL 297 print(it. it + BSZ. “find_first_of”. ” “); it = find_first_of(v.beginO, v.endO. b. b + BSZ. PlusOneO); printCit.it + BSZ.”find_first_of PlusOne”,” “); it = search(v.beginO, v.endO. b, b + BSZ): printCit. it + BSZ. “search”. ” “); int c[] = { 5. 6. 7 }: const int CSZ = si


Комментарии закрыты.