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

Code Example 1

// Copying vector by copy function 
copy(vect1.begin(), vect1.end(), back_inserter(vect2));

Learn ReactJs, React Native from akashmittal.com