shadow4light
2011-10-06 13:12:13 UTC
Say I want to write a function to insert nodes into a Binary Tree or a 2-4 Tree. How do I access the tree, in order to add the node to it?
I have a feeling that it's not like C, where you can just pass the tree in through arguments/parameters.
I saw a function prototype for it, and it was Tree.Insert(int x), where x is the integer to insert.
I'm fairly new to C++, so I don't really know much about this.
Constructive help will be greatly appreciated.
Thank you.