Just reading your comments for the library update on the other thread, you say you check for empty input strings. Ummm, that wasn't exactly the problem. When I said "It seems to be expected that the item will be found", I didn't mean that the search was failing because of the input string being empty, I meant it failed because the target was not in the tree.
So you have definitely improved it by checking the input, and a return of "-1" is as good as any, but, sadly, my original problem is still there.
In your sample program, tree_1.1.sbp, type in the text "mummy" then search, you'll see what I mean.
|