Can anyone tell what's wrong with my code. It is not print anything? link:-https://ide.codingblocks.com/s/615062

#include
using namespace std;
class node{
public:
int data;
node*next;

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

};
void insertattail(nodehead,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);
return;
}
node* append(node &head,int k,int N){
node
temp1=head;

while(temp1!=NULL){
     temp1=temp1->next;
}
temp1->next=head;

int count=1;
while(count<=(N-k)){
	head=head->next;
   count++;
}
node*newhead=head->next;
head->next=NULL;
return newhead;

}

void print(nodenewhead){
node
temp=newhead;
while(temp!=NULL){
cout<data<<" ";
temp=temp->next;
}
}
int main() {
int N,k,value;
cin>>N;
nodehead=NULL;
for(int i=0; i<N; i++){
cin>>value;
insertattail(head,value);
}
cin>>k;
node
newhead=append(head,k,N);
print(newhead);
return 0;
}

link- https://ide.codingblocks.com/s/615062