extend vector C++ code example
Example: c++ vector extend vector
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}
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}