Creating a Hash Table

Dear Friends,
I want to create a hash table using the standard Glib header (if possible) so that I can store a structure and keep the hash key(search key) based on a string.

Any example code would be great since I am not able to get the main idea.

best regards
Skull

Why not just use the dbm routines? They provides a way of managing data in the form of associative arrays/hash tables. Implementations include NDBM (the new DBM implementation), ODBM (the old implementation), and GDBM (the GNU implementation.)

Or consider using hsearch from search.h which is available on most systems.

maybe a map<string,string> would do the trick.

I wrote one a while ago based loosely on the sample code in K&R. You're welcome to it.