RAGEAngel9
11-19-2001, 12:17 AM
Hey guys I'm trying build a tree traversal function and i'm kind of stuck.
I'm supposed to take a tree, a enum that has the method of traversal, and a pointer to a function that will do something with each node.
Well
I've tried building the function with 4 if statements, one for each method.
I think the problem is with my ifs
void Tree_Traverse(Tree *List , Tree_Traverse_Method Direction , void
(*Func)(Person *) )
if ( Direction == LNR )
{
Blah blah
}
does this look right?
I'm supposed to take a tree, a enum that has the method of traversal, and a pointer to a function that will do something with each node.
Well
I've tried building the function with 4 if statements, one for each method.
I think the problem is with my ifs
void Tree_Traverse(Tree *List , Tree_Traverse_Method Direction , void
(*Func)(Person *) )
if ( Direction == LNR )
{
Blah blah
}
does this look right?