I'm having a hard time finding a code
example that shows how to delete a
binary tree that was created with tsearch().
I'd prefer not to use the tdestroy() GNU
extension and twalk() says not to change
the tree while you are walking it.
OpenBSD man page say pass root node
to tdelete() and you get new root node
back, but I can't tell for sure if that will
work on GNU/Linux as well.
I hope this is the right list for this
On 6/7/2010 3:42 PM, mbucc wrote:
> I'm having a hard time finding a code
> example that shows how to delete a
> binary tree that was created with tsearch().
> I hope this is the right list for this
Unfortunately, it's not, as tdelete() and related functions
are not part of the Standard C library (they appear to be POSIX
and/or Unix and/or X/Open utilities).