What's the fastest way to reset every value of a std::vector<int> to 0 and keeping the vectors initial size ?
std::vector<int>
A for loop with the [] operator ?
std::fill(v.begin(), v.end(), 0);
1.4m articles
1.4m replys
5 comments
57.0k users