I have tried running the code on codeblocks and it is running fine there please help me

#include
using namespace std;
class node
{
public:
int data;
nodenext;
node(int d)
{
data=d;
next=NULL;
}
};
void insert_head(node
&head,int data)
{
noden=new node(data);
n->next=head;
head=n;
}
void insert_last(node
&head,int data)
{ if(head==NULL)
{
insert_head(head,data);
}

else{
        node*temp=head;
while(temp->next!=NULL)
{
    temp=temp->next;
}
node*n=new node(data);
n->next=temp->next;
temp->next=n;
}

}
void print_li(nodehead)
{
while(head!=NULL)
{
cout<data<<",";
head=head->next;
}
}
void build_li(node
&head,int n)
{
while(n>0)
{ int data;
cin>>data;
insert_last(head,data);
n–;
}
}
nodereverse_k(node&head,int k)
{
nodec=head;
node
p=NULL;
noden;
int count=0;
while(c!=NULL && count<k)
{
n=c->next;
c->next=p;
p=c;
c=n;
count++;
}
if(n!=NULL)
head->next=reverse_k(n,k);
return p;
}
int main()
{
node
head=NULL;
int n,k;
cin>>n>>k;
build_li(head,n);
head=reverse_k(head,k);
print_li(head);

}

which help you need
you say
I have tried running the code on codeblocks and it is running fine

if running fine then what’s the problem??

if you have any doubt please share the link of code also

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.