Is there a C library version of the C++ std::map in a standard library?
There is nothing built into the standard library, but uthash may meet your needs.
The C standard library does not support such an equivalent. However, a commonly used C library is GLib from the GNOME project. In particular, the GLib Hash Tables may be what you're looking for.
std::map
is not a hash table. Therefore, my suggestion: Red-Black Tree C Code
The following C files implement balanced binary trees using the red-black paradigm. I have written these functions in a very general manner so that the key can be anything at all. Each node of the balanced binary tree must contain a key and a pointer to info. The user defines what data-type the key is and provides a comparison function for the keys. The info can also be any kind of data type.
(Disclaimer: haven't tried it myself.)