I have heard a lot of talk about hashtables from time to time. They are supposed to be very cool ways of storing data where the index you use to look up the data is somehow the data itself.

But hashtables are not part of the C++ standard template library... I think. So does anyone have any tips on how to write a hashtable?

There are hash_map and hash_set containers in Visual C++ (based on SGI implementation).
See also:
http://code.google.com/p/google-sparsehash/
(yet another hash containers templates, downloadable and well-documented).
Look at a rather good hash function for raw bytes data (this link turned up just at the right moment;)):
http://www.myserverproject.net/doc/source/hash__map_8cpp.html
The last (but not least) link (with tons of references):
http://en.wikipedia.org/wiki/Hash_table

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.