// reverse_copy example #include <iostream> // cout #include <algorithm> // reverse_copy #include <vector> // vector using namespace std; int main () { int myints[] ={1,2,3,4,5,6,7,8,9}; vector<int> myvector; myvector.resize(9); // allocate space reverse_copy (myints, myints+9, myvector.begin()); // print out content: cout << "myvector contains:"; for (vector<int>::iterator it=myvector.begin(); it!=myvector.end(); ++it) cout << ' ' << *it; cout << ' '; return 0; }