I have a pointer to a struct object in C++.
node *d=head;
I want to pass that pointer into a function by reference and edit where it point
Pass a node ** as an argument to your function:
node **
// f1 : node *d = head; f2(&d); // f2: void f2(node **victim) { //assign to "*victim" }