Merge two sorted linked list

**WHAT AM I MISSING???

#include

using namespace std;

class node{
public:
int data;
node* next;

node(int d){
	data = d;
	next = NULL;
}

};

void print(node*&head){
while(head!=NULL){
cout<data<<" ";
head = head->next;
}
}
void insertAtTail(node*&head,int d){
if(head==NULL){
head = new node(d);
return;
}

node*tail = head;
while(tail->next!=NULL){
	tail = tail->next;
}
tail->next = new node(d);

}

node* take_input(){
node* head=NULL;
int n,x;
cin>>n;
for(int i =0;i<n;i++){
cin>>x;
insertAtTail(head,x);
}
return head;
}

node* merge(noden1,noden2){
if(n1==NULL)
return n2;
if(n2==NULL)
return n1;

node* n3;

if(n1->data < n2->data){
	n3 = n1;
	n3->next = merge(n1->next,n2);
}
else{
	n3 = n2;
	n3->next = merge(n1,n2->next);
}
return n3;

}

int main(){
int t;
cin>>t;
while(t>0){
nodeh1 = take_input();
node
h2 = take_input();
node*n3 = merge(h1,h2);
print(n3);

t--;
}

return 0;

}

hi @anmolsri1_27cc712632507b5a,
if the doubt is still there please send the code by saving in ide.codingblocks.com
or refer https://www.geeksforgeeks.org/merge-two-sorted-linked-lists/