how to delete a node c++

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

Source

Also in C++: