My program crashes when my tree is empty. When i search for a value that is in the tree it finds and displays it fine. Yet if i enter a value that is not in the tree it will crash.
Also my tree gets overwritten after one sucessful search.
What am i doing wrong?