What's the difference between passing node* and node *& into a function? Don't they both pass a memory address? What do you actually pass when you use one over the other?
2 Answers
The node *& is a reference to a pointer, whereas node* is simply a pointer.
In that way, node *& adds an additional level of indirection and it is basically a second name for some node * (pointer to node). It is most frequently used for argument passing.
Please, take a look here for details.
intvs.int &. Ordoublevs.double &. Or any otherTvs.T &.node *&is similar tonode **