Check out example codes for "how to delete a node c++". It will help you in understanding the concepts better.

Code Example 1

void del (node *before_del) 
{
    node* temp;
    temp = before_del->next;
    before_del->next = temp->next;
    delete temp;
}

Learn ReactJs, React Native from akashmittal.com