| Category: algorithms | Component type: function |
template <class BidirectionalIterator, class OutputIterator>
OutputIterator reverse_copy(BidirectionalIterator first,
BidirectionalIterator last,
OutputIterator result);
The return value is result + (last - first).
vector<int> V;
V.push_back(0);
V.push_back(1);
V.push_back(2);
copy(V.begin(), V.end(), ostream_iterator<int>(cout, " "));
// Output: 0 1 2
list<int> L(V.size());
reverse_copy(V.begin(), V.end(), L.begin());
copy(L.begin(), L.end(), ostream_iterator<int>(cout, " "));
// Output: 2 1 0
| Contact Us | Site Map | Trademarks | Privacy | Using this site means you accept its Terms of Use |
| Copyright © 1993-2006 Silicon Graphics, Inc. All rights reserved. |