05-02-2011, 05:54 PM
What is the concept of having the data member of the same class within it? i.e. class TreeNode { private: TreeNode *right; TreeNode *left; int Object; };
|
What is the concept of having the data member of the same class within it? i.e. class
|
|
05-02-2011, 05:54 PM
What is the concept of having the data member of the same class within it? i.e. class TreeNode { private: TreeNode *right; TreeNode *left; int Object; };
05-02-2011, 05:54 PM
Basically it is not data member but the pointer to object of the same class. So each generated object of this class can point to two other objects also called node of the same class. This is used to implement tree or link lists.
0300-9520262 Get solution in 24 hour |cpmputer & internet mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
|
|
« Next Oldest | Next Newest »
|