Slime wrote:
> If you're
> not worried about copying Trees around, you can just remove the & from the
> return type.
Changing this single character makes my program work as intended. Yay me!
I guess the efficient thing to do would be to have the caller allocate
an empty tree and pass it in by reference and mutate that... Hmm, but
how to be sure the tree passed in is empty? I guess I could just add
another assert() for that...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|