How to delete element from hsearch
问题 I am using hsearch_r function provided by GNU C library. I see that while i can add elements into the HASH table using hsearch_r and passing the action as ENTER, i see no way to remove an element or an entry from the HASH table. Does anybody know a reason why this is so? Can i do the following to implement my delete function. I first search for it using hsearch_r with the action as FIND. Then once i get a pointer to the hash_element then i free it. Will that work? What good is a hash library