I am trying to program a binary tree with some nodes. First, I determine the number of nodes (which is 15 if you have 3 objects). For the nodes, I have made a class "node" with parameters like the level and the parent.
I have some problems to determine the parent. I determine the integer value of the parent (let's say that for node 3 the parent is node 1). Then I want to set for Node_i his parent.
Node_i->setParent(Node_parent);
However, the compiler says that Node_parent is undefined. But how can I set the parent for a node?