classes(recursion in methods)

i was writing a code for binary tree class.I am not able to write the code for in order print.
my code https://ideone.com/7a0u3a

the problem is that the method in_order_print() has no argument,So how do i call it recursively.
You could implement it without recursion, or create another function that uses recursion that you call from in_order_print().
how can i do it without recursion ?
thanks
This problem is easier solved using recursion. You are right that calling tree::in_order_print() recursively will not work. What you could do is to create another function that takes a node object as argument (or the function could be a member of the node class). This function could be recursive and the tree::in_order_print() function could call this function once, passing the root as argument.
thanks
it is working fine.
Topic archived. No new replies allowed.