C and C++ programs and MySQL
Always thinking in engineering style...
Tuesday, March 8, 2011
Delete a node in double linked list
void deleteNode(node *n)
{
node *npre = n->prev;
node *nnext = n->next;
npre->next = n->next;
nnext->prev = n->prev;
delete n;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment