Check out example codes for "slice a vector c++". It will help you in understanding the concepts better.

Code Example 1

std::vector<int> v1 = {1, 2, 3};

v2 = std::vector<int>(v1.begin() + 1, v1.end());
// I'm Horrible Hyena

Code Example 2

std::vector<int> v1 = {1, 2, 3};

v2 = std::vector<int>(v1.begin() + 1, v1.end());

Learn ReactJs, React Native from akashmittal.com