Contact: aviboots(AT)netvision.net.il
40,959 questions
53,424 answers
573 users
#include <iostream> #include <vector> int main() { std::vector<int> v(10, 0); for (int val : v) std::cout << val << " "; } /* run: 0 0 0 0 0 0 0 0 0 0 */
#include <iostream> #include <vector> int main() { std::vector<double> v(10, 0); for (double val : v) std::cout << val << " "; } /* run: 0 0 0 0 0 0 0 0 0 0 */