From: "Hossein Haeri"
In fact, the tree I want to represent is just a hierarchy. The only fact that I know about this hierarchy is the parent/child relationship.
This still makes it hard to come up with a solution for it, because you don't say what operations are needed on the tree, or how many children there are - although you said _binary_ search tree, but as others have pointed out, with the tree being unordered, it's no longer a search tree, so one may wonder if the binary part is correct, too. Given your current description of what you want, here's one that satisfies it: template<class T> struct tree_node { T data; tree_node *left; tree_node *right; }; This isn't intended to be sarcastic, but rather to point out that so far you've provided way too little information about what you want to do with the tree, to be able to give a meaningful reply (other than the links to present libraries). Regards, Terje