J. wrote:
> I am trying to traverse a binary tree, returning each node that is
> encounterd so that I can preform operations on that node. However it keeps
> looping over the same first node, it refuses to travel any further down
> the tree ... What did I overlooked ? I know the tree is loaded wi
On Wed, 26 Jan 2005, Eric Bambach wrote:
> On Wednesday 26 January 2005 05:01 pm, J. wrote:
> > Wednesday, January 26
> > I guess there is something wrong in my reasoning about this...
>
> Yea, that definatly wont work. I think you're messing up because a recursive
> function can only pass back
Hi,
It did traverse your binary tree. However, your call to printf is only
performed with the first(?) node.
I think this is how to accomplish what you want.
snippet+ ---
{
treerecurse(root); // you don't need a loop here
}
struct tnode *treerecurse(struct tnode *p) {
On Wednesday 26 January 2005 05:01 pm, J. wrote:
> Wednesday, January 26
>
> Hello,
>
> I am trying to traverse a binary tree, returning each node that is
> encounterd so that I can preform operations on that node. However it keeps
> looping over the same first node, it refuses to travel any furthe