On Mon, 9 Jun 2003, Hossein Haeri wrote:
The (obvious) solution was to use a graph, and if necessary, add code that constrains it to satisfy the tree properties.
And how can I find the related emails? Can you remember the topic for those?
I went back and looked, and in Kasper Peeters' response to your original email, he pointed to a generic n-ary tree (imho a good solution): http://www.damtp.cam.ac.uk/user/kp229/tree/#structure His email is here: http://article.gmane.org/gmane.comp.lib.boost.user/3564/match=+kasper+peeter... I'd agree with some of the other responses, though...the basic, five-line solution is extremely simple, and it works. If you need extra operations like tree traversals or search, they may depend on your specific problem enough that you'd benefit from a custom-tailored solution. -Ryan ------------------------------- "The most is how much I front. It's...it's the amount." -MC Frontalot, 'Front the Most'