#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
vector<int > x;
x.push_back(1);
x.push_back(6);
x.push_back(9);
x.push_back(10);
vector<int > y;
y.push_back(2);
y.push_back(7);
y.push_back(8);
y.push_back(12);
y.push_back(13);
vector<int > resx;
resx.resize(10);
cout<<"start to"<<endl;
merge(x.begin(),x.end(),y.begin(),y.end(),resx.begin());
cout<<"start ..."<<endl;
for (int i=0; i<resx.size(); i++)
{
cout<<resx[i]<<" ";
}
cout<<"end to"<<endl;
cout<<endl;
}
g++ -c merge.cpp
g++ -o merge merge.o