Contact: aviboots(AT)netvision.net.il
41,615 questions
54,278 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 */