If it is not found, then tsearchĪdds it, and returns a pointer to the newly added item. If the item is found in the tree, then tsearch Then the variable that rootp points to should be set to Whether the first item is less than, equal to, or greater Integer which is negative, zero, or positive, depending on The actual data.) compar points to a comparison routine, Theįirst field in each node of the tree is a pointer to theĬorresponding data item. They are generalized from Knuth (6.2.2) Algorithm T. ![]() SYNOPSIS #include void *tsearch (const void * key, void ** rootp, int (* compar )(const void *, const void *)) void *tfind (const void * key, const void ** rootp, int (* compar )(const void *, const void *)) void *tdelete (const void * key, void ** rootp, int (* compar )(const void *, const void *)) void twalk (const void * root, void (* action ) (const void * nodep, const VISIT which, const int depth )) DESCRIPTION tsearch, tfind, twalk, and tdelete manage a binary tree. Tsearch, tfind, tdelete, twalk - manage a binary tree TSEARCH(3) Linux Programmer's Manual TSEARCH(3)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |