M
mlt
Is there someway to create a std::vector from a sequence of numbers? On this
page:
http://www.cppreference.com/wiki/stl/vector/vector_constructors
there are 4 different constructors, but none of them supports something
like:
std::vector<int> v = {1,2,3};
Its only possible to do it like:
std::vector<int> v;
v.push_back(1,2,3);
page:
http://www.cppreference.com/wiki/stl/vector/vector_constructors
there are 4 different constructors, but none of them supports something
like:
std::vector<int> v = {1,2,3};
Its only possible to do it like:
std::vector<int> v;
v.push_back(1,2,3);