Jump to content
  • Advertisement
Sign in to follow this  
Buzz1982

hash map in C ( like std::map in c++ )?

This topic is 3883 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Do u know if there is any good hash map library in C ( some thing similar to std::map ). I can only use C for my project and cannot use c++ standard library or stl. Please point me to such a resource if u know any. Thank you. Bye.

Share this post


Link to post
Share on other sites
Advertisement
std::map isn't a hash map, it's typically a red black tree. Do you really want a hash map (I.e. can the type you want to store in it hash correctly?), or do you want something like std::map?

Either way, what type are you storing in it? C doesn't have templates, so you'll need one implementaion of the data structure for every type you want to use with it.

Share this post


Link to post
Share on other sites
yes i am looking for something similar to std::map in C. The types i want to store are,
key : char*
value : double

thanks
bye.

Share this post


Link to post
Share on other sites
I dont care if it uses red black tree or some hash function. All I need is a fast way of retrieving double values given a char * key.

thanks
bye.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!