#include <algorithm> #include <iostream> #include <iterator> #include <string> #include <vector> using namespace std; int main( ) { vector<int> v( 5, 9 ); copy( v.begin(), v.end(), ostream_iterator<int>( cout, " " ) ); copy( v.begin(), v.end(), ostream_iterator<int>( cout, "\n" ) ); }