std::vector<int> a = {1, 2}; std::vector<int> b = {3, 4, 5}; a.insert(a.end(), b.begin(), b.end()); // a = {1, 2, 3, 4, 5}