filln1.cpp

We use cookies. Read the Privacy and Cookie Policy

filln1.cpp

#include ‹stl.h›

#include ‹iostream.h›

int main() {

 vector‹int› v(10);

 fill_n(v.begin(), v.size(), 42);

 for (int i = 0; i ‹ 10; i++) cout ‹‹ v[i] ‹‹ ;

 cout ‹‹ endl;

 return 0;

}