hey guys, ive got this binary tree program meant to just take in numbers, and output them inorder, but i cant seem to get the print function to work, everything compiles so im lost, a little help would be much appreciated!
You have the variable name 'tree' as a gobal variable and several times as local variable. That's not good but not the problem.
The problem is on line 52. The gobal 'tree' remains NULL while you're producing nodes which are never assigned and hence are lost. Try this: tree = insert(tree, i);