Standard C++ Library Class Reference

copy(v3.begin(),v3.end(),out);
cout << endl;
//
// Fill cout with 3 5's
//
fill_n(ostream_iterator<int>(cout," "),3,5);
cout << endl;
return 0;
}
Output :
9 9 9 9
7 7 7 4
11 11 11 11 11
5 5 5
Warnings
If your compiler does not support default template parameters then you need to always supply
the Allocator template argument. For instance you'll have to write:
vector<int,allocator>
instead of:
vector<int>