It looks like your tree insert function is alright, but your showtree function is wrong. You don't need that complex if-statement in the middle. You already know that you're one a node that is not NULL (thanks to the earlier if-statement) so all you need to do is output that value (plus the recursive calls that you have correct).



LinkBack URL
About LinkBacks


