1#include <vector> // vector
2#include <iostream> // output
3using namespace std;
4
5int main()
6{
7 // two vectors to concatenate
8 vector<int> A = {1,3,5,7};
9 vector<int> B = {2,4,6,8};
10 // vector that will hold the combined values of A and B
11 std::vector<int> AB = A;
12 AB.insert(AB.end(), B.begin(), B.end());
13 // output
14 for (auto i : AB) {
15 cout << i << ' ';
16 }
17}