Why isn't this program running?

#include
using namespace std;

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

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

};
int length(nodehead)
{
int count{0};
while(head!=NULL)
{
count++;
head=head->next;
}
return count;
}
void insertatend(node
&head,int d)
{
node*tail=head;
if(head==NULL){
head=new node(d);
return;
}

    while(tail->next!=NULL)
    {
        tail=tail->next;
    }
    tail->next=new node(d);
    return;
}
void insertatmiddle(node*&head,int d,int p)
{
    if(p==0 or head==NULL){
        insertathead(head,d);
    }
    
        else if(p>length(head)){
            insertattail(head,d);
        }
    else
    {
     node*temp=head;
     int i{0};
     while(i<p){
         temp=temp->next;
         i++;
     }
     node*n=new node(d);
     n->next=temp->next;
     temp->next=n;
    }
            
}
void insertathead(node*&head,int d)
{
    if(head==NULL)
    {
        head=new node(d);
        return;
    }
 node*n=new node(d);
 n->next=head;
 head=n;
}
void print(node*head)
{
    while(head!=NULL)
    {
        cout<<head->data<<"->";
        head=head->next;
    }   
    cout<<endl;
}

int main()
{
node*head=NULL;
cout<<(“hello world\n”)<<endl;
insertathead(head,30);
insertathead(head,20);
insertathead(head,10);
insertathead(head,0);
print(head);
insertatmiddle(head,15,2);
insertatend(head,40);
print(head);
return 0;
}

hi @21cs3042 send the code on ide.codingblocks.com
save and share the url of page

Coding Blocks IDE

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.