I am trying to merge two vectors and return a vector. if vector a is {1,4,9,16} and vector b is {9,7,4,9,11} and the merged vector is {1,9,4,7,9,4,16,9,11} here is my beginning code.
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
vector<int> merge(vector<int>, vector<int>);
int main()
{
int num_one, num_two, exit = 0;
vector<int> num_a;
vector<int> num_b;
while (exit != -1)
{
cout << "Enter first vector element: ";
cin >> num_one;
cout << endl;
cout << "Enter second vector element: ";
cin >> num_two;
cout << endl;
cout << merge(num_a, num_b) << endl;
cout << "Enter exit(-1): ";
cin >> exit;
cout << endl;
}
return 0;
}
vector<int> merge(vector<int> a, vector<int> b)
{
}