IsEmpty
Returns the information on whether the node is empty or not. The node must be valid. The node is considered empty if it has no child nodes or if the value it holds is empty.
BOOL IsEmpty( )
TRUE if empty, otherwise FALSE.
EX1
void TreeNode_IsEmpty_ex1() { Tree tr; TreeNode tn; tn = tr.AddNode("Node1"); if (tn.IsEmpty()) out_str("The node is empty."); else out_str("The node is not empty."); // Output: The node is empty. tn.strVal = "xyz"; //Add a string value to tn if (tn.IsEmpty()) out_str("The node is empty."); else out_str("The node is not empty."); // Output: The node is not empty. }
origin.h