We need help with a code. We need to be able to remove the entire list or just a part of the list. We need this ASAP so please respond with a good reply. Thanks
Ryan
We need help with a code. We need to be able to remove the entire list or just a part of the list. We need this ASAP so please respond with a good reply. Thanks
Ryan
A list? I'll assume you're using a linked list, since you've posted no code.
void removeList( Node *listStart )
{ if ( listStart ) { removeList( listStart->next ); free( listStart ); }
For removing a single node, it's just a matter of making sure the pointers are correct, then freeing up that space:
prevNode->next = currentNode->next;
free( currentNode );
Quzah.
Let me again state how much I hate the timer on your signin/signout on this board...
Quzah.
Hope is the first step on the road to disappointment.