#include
using namespace std;
The template & lt; The class T>
Struct LinkNode {
T data;
LinkNode
};
The template & lt; The class T>
The class List {
Private:
LinkNode
Public:
Void Input ();
Void the Output ();
LinkNode
};
The template & lt; The class T>
Void List
LinkNode
LinkNode
NewNode=new LinkNode
Cout<& lt;" Input the list elements: ";
Cin> Current - & gt; The data;
};
The template & lt; The class T>
Void List
LinkNode
While (current!=NULL) {
Cout<& lt;" "& lt;
}
};
The template & lt; The class T>
Void Combine (List
{
LinkNode
LinkNode
LinkNode
If (current1 - & gt; The link!=NULL& & Current2 - & gt; The link!=NULL)
{
Current1=current1 - & gt; The link;
Current2=current2 - & gt; The link;
While (current1!=NULL& & Current2!=NULL)
{
If (current1 - & gt; Data
Current3 - & gt; The link=current1;
Current1=current1 - & gt; The link;
}
The else {
Current3 - & gt; The link=current2;
Current2=current2 - & gt; The link;
}
}
}
};
Void main () {
List
L1. Input ();
L2. Input ();
Cout<& lt;" L1 list as follows: ";
L1. The Output ();
Cout<& lt;" B list as follows: ";
L2. The Output ();
Combine (L1, L2, L3);
Cout<& lt;" M, n after the merger shall be the A: ";
L3. The Output ();
}