Alter your code to something like this:
void insertAtStart(node** head , int data )
{
if(head == nullptr)
{
}
node* temp = new node;
temp->next=*head;
temp->data=data;
*head=temp;
}
Which you can use like this:
node *head = nullptr;
insertAtStart(&head,8000);
insertAtStart(&head,9000);
Best regards
Espen Harlinn