05-02-2011, 05:15 PM
1. As the data type of left and right pointer is same as the parent class TreeNode. Therefore we declare left and right pointer with TreeNode data type. Therefore we can not use any other type of data like integer, float, char etc.
2. Object is a private data element of Object *, used to store the tree element (value) inside the node of the tree. Left is a private data member of type TreeNode*, it is used to store a pointer to the left sub-tree. Right is a private data member of type TreeNode *, employed to store a pointer to the right sub-tree.
2. Object is a private data element of Object *, used to store the tree element (value) inside the node of the tree. Left is a private data member of type TreeNode*, it is used to store a pointer to the left sub-tree. Right is a private data member of type TreeNode *, employed to store a pointer to the right sub-tree.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
