Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

delete a head node in link list

void deleteNode(Node *head)
{
    Node* temp=head;
    if(head!=NULL)
    {
        head=head->next;
        delete temp;
    }
}
 
PREVIOUS NEXT
Tagged: #delete #head #node #link #list
ADD COMMENT
Topic
Name
9+9 =