I'm trying to code a class for binary tree representation. Each node has a value (key), an index, and a Node* pointer for parent(p), left-child(left) and right-child(right).
The problem is on pointers. It's easier giving my example problem than explaining.
I coded a print() function that prints out each node in the tree. Here is the class header file. And here is the main test file.
The problem is, when i call T.print(), it prints only 10, 5 and 7.
true?