Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// 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; }