Ok so I am building a tree using c++
In my remove function
and I am using a reference (TNode<Whatever> & elementTNode) to point to the deleted data in a node in the tree (TNode<Whatever> *)... So, when node is deleted the reference goes back to main function to print out the deleted data, saying that it deleted it. But the reference only has the name of the node and not the rest of the data to be printed out. So what I do not understand is how to make it point to the data and being able to hold onto it.
Ex: i tried in my Tnode remove func
elementTNode.data = data;
elementTNode.data = this->data;
doesnt work....
can sum1 plz help me?