So the whole concept is to sort a singly linked list using insertion sort and deleting the nodes in order. The other codes are given, so all I have to do is fill in the "void InsertNode(int v)" and "void DeleteNode(int v)" and I am having trouble with it.

The result should be something like:
50 30 20 10 70 80 60 90 100 40
50 is inserted
30 is inserted
20 is inserted
...
100 is inserted
10 20 30 40 50 60 70 80 90 100
Good Job!
50 is deleted
10 20 30 40 60 70 80 90 100
30 is deleted
10 20 40 60 70 80 90 100
20 is deleted
10 40 60 70 80 90 100
10 is deleted
40 60 70 80 90 100
70 is deleted
40 60 80 90 100
80 is deleted
40 60 90 100
60 is deleted
40 90 100
90 is deleted
40 100
100 is deleted
40
40 is deleted
But mine would be like:
50 30 20 10 70 80 60 90 100 40
50 is inserted
30 is inserted
20 is inserted
...
100 is inserted
0
Good Job!
0
0
0
0
0
0
0
0
0
0
Code:
#include <iostream>
#include <cstdlib>
#include <ctime>  
using namespace std;
class Node{
   public:
      int value;
      Node *next;
}; 
class LinkedList{ //Singly Linked List
public:
   LinkedList(){
   head=NULL;
   } 
   void SubMain(){
      bool result;   
      UniqueRandomData(10);
      CallInsertNode();
      PrintNode();
      result=CheckNode();
      CallDeleteNode(); 
   }
   void UniqueRandomData(int n){
      int i, j, k, temp;
      this->n=n;   
      x=new int[n]; 
   
   for(i=0; i<n; i++)
   x[i]=(i+1)*10; 
   
   for(i=0; i<n; i++){
      j=rand()%n;
      k=rand()%n;
      
      temp=x[j];
      x[j]=x[k];
      x[k]=temp;
   } 
   
   for(i=0; i<n; i++)
   cout<<x[i]<<" ";
   cout<<endl;
   }

   void InsertNode(int v){
      cout<<v<<" is inserted."<<endl;

      if (head == NULL) {
         head =  new Node();
       }
       else
       {
        head->next = new Node();
        head = head->next;
       }
            }
   }
   void PrintNode(){
      Node *cur=head; 
      while(cur!=0){
      cout<<cur->value<<" "; 
      cur=cur->next; 
      } 
   cout<<endl;
   }
   void CallInsertNode(){
      int i;
      for(i=0; i<n; i++)      
         InsertNode(x[i]);   
   }
   
   bool CheckNode(){
      Node *cur=head;
      while(cur !=NULL && cur->next !=NULL)
      if(cur->value > cur->next->value){
      cout<<"Error!"<<endl;
      cout<<cur->value<<", "<<cur->next->value<<endl;
      return false;
   }
   else 
   cur=cur->next;
   
   cout<<"Good job!"<<endl;
   return true;
   } 
   
   void CallDeleteNode(){
      int i;
   for(i=0; i<n; i++){  
      DeleteNode(x[i]); 
      this->PrintNode(); 
   }
   }

   void DeleteNode(int v){
       Node* prev = this->head;
        Node* current = this->head->next;
        while(current->value != v)
        {
                current = current->next;
                prev = prev->next;
        }
        if(current->value == v)
        {
                prev->next = current->next;
                delete current;
        }
      
      cout<<v<<" is deleted.";
      }
   
   private:
      Node *head;
      int *x;
      int n;
   
}; 
int main(){
   LinkedList a; 
   a.SubMain(); 
}