vector<int> v1 = {1, 2, 3}; vector<int> v2 = {4, 5, 6}; copy(v1.begin(), v1.end(),back_inserter(v2)); // v2 now contains 4 5 6 1 2 3