// Using a for loop with index for(std::size_t i = 0; i < v.size(); ++i) { std::cout << v[i] << " "; }