How can I do the equivalent of the following using C++/STL? I want to fill a std::vector with a range of values [min, max).
std::vector
# Python >>>
In C++11, there's std::iota:
std::iota
#include #include //std::iota std::vector x(10); std::iota(std::begin(x), std::end(x), 0); //0 is the starting number