Program
#include
#include
using namespace std;
void main()
{
list
list
l1.push_back(10);
l1.push_back(50);
l1.push_back(30);
l2.push_back(22);
l2.push_back(60);
l2.push_back(11);
list
p=l1.begin();
l1.merge(l2);
l1.sort();
while(l1.size()>0)
{
int value=l1.front();
cout << value << endl;
l1.pop_front();
}
}
Output
10
11
22
30
50
60
Press any key to continue