Which is the best way to extract part of a vector? If I have
std::vector<int> v1(9);
for(int i = 0; i < 9; i++)
v1[i] = i + 1;
I need a code that put in
std::vector<int> v2(2);
the second and third element of v1. I have to do a cycle or there is a smartest way?