Use of ‘**’ or pointer to a pointer in a doubly linked list c++

  c++, doubly-linked-list, pointer-to-pointer

Im confused about the use of a pointer to a pointer in DLL functions such as:

void deleteNode(Node** head_ref, Node* del)

I understand that the function deleteNode is being passed the address to head_ref, but why is this neccesary? Why can’t Node* head_ref be passed?

Source: Windows Questions C++

LEAVE A COMMENT