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 >>>
I don't know of a way to do it like in python but another alternative is obviously to for loop through it:
for (int i = range1; i < range2; ++i) { x.push_back(i); }
chris's answer is better though if you have c++11