I l@ve RuBoard Previous Section Next Section

copy()

Copies the elements of one container into a second container.



#include <algorithm> 


ostream_iterator<int>  ofile( cout, " " ); 


copy( vec.begin(), vec.end(), ofile ); 





vector<string> target( svec.size() ); 


copy( svec.begin(), svec.end(), target.begin() ); 
    I l@ve RuBoard Previous Section Next Section