Pointers
So I'm trying to build a Binary Search Treeⓘ (BST), but I'm having a problem with the pointers.
Example:
If you can help me with this, I'd be really helpful.
Example:
Code:
void func(Node*&node){
(...) //it just prints the node's properties.
}
Node * root =&Node(1); //e.g. root = 0x500000;
func(root); //before function, root still has value of 0x500000; after function, root becomes invalid(points to a different block of memory), but it shouldn't since there isn't anything in the function that could cause that.
If you can help me with this, I'd be really helpful.

