// Program: fill6.cpp
// use a standard algorithm to fill a vector
#include
#include
#include // needed for std::fill
int main()
{
std::vector v(5);
std::fill (v.begin(), v.end(), 1);
for (int i=0; i<5; ++i)
std::cout << v[i] << " "; // 1 1 1 1 1
std::cout << "\n";
return 0;
}