#include <iterator>
;iterator
vector<int> v;
deque<int> d(10, 1);
copy(d.begin(), d.end(), back_inserter(v)); // back_inserter 반복자 사용
vector<int>::iterator iter;
for (iter = v.begin(); iter != v.end(); ++iter)
cout << *iter << endl;
;istream_iterator
istream_iterator<char> in(cin);
istream_iterator<char> eos;
find(in, eos, "char"); // find 알고리즘 사용
;ostream_iterator
list<int> list1;
list1.push_front(11);
list1.push_back(22);
ostream_iterator out(cout, "\n");
copy(list1.begin(), list1.end(), out); // copy 알고리즘 사용
'::public > C++' 카테고리의 다른 글
std::string (0) | 2019.07.18 |
---|---|
<iostream> (0) | 2019.06.20 |
STL map (0) | 2019.06.17 |
STL algorithmn (0) | 2019.06.13 |
STL container (0) | 2019.06.12 |