This basically means that some Node objects do not have left and right initialized to zero.
It is usually a good idea to define a node something like this.
class Node { int info; Node* left; Node* right; public: Node( int infoin , Node* leftin = NULL , Node* rightin = NULL ) : info(infoin) , left(leftin) , right(rightin) {} }
Thus, if the left and right nodes are not known at build time, they are null.
And if they are really known when building Node , you donโt pay a fine for installing right and left to zero and then something else
source share