I have written the code for the basic functions of a binary search tree. All code works ok and I can use printf to view any results. The problem is I need to port the functions in a DLL and then link to the dll from a console application or a .net frontend.
In the function that traverses the tree which I have written to use recursion, I need to get each value encountered to the front end. My function now returns a void. What can I use to return each node value from the function when it is compiled in the dll? Can I still use printf or is there a way to "return" each integer?
I tried using return but this just gets the first value and returns (obviously). I just need it to return a value and loop or recurse in the function to get the rest of the node's values.
I've been trying so many things I've ended up running in loops!
Thanks for any input anyone may contribute.