Pelo GANDO said:
Hi everybody !
I am a beginner in C++. I am looking for a (simple if it's possible) source
code in C++ about hash table...
Thank you !
Pelo
[quote - Josuttis' STL Reference Book]
6.7.3 Hash Tables
One important data structure for collections is not part of the C++ standard
library: the hash table.
There were suggestions to incorporate hash tables into the standard;
however, they were not part
of the original STL and the committee decided that the proposal for their
inclusion came too late.
(At some point you have to stop introducing features and focus on the
details. Otherwise, you
never finish the work.)
Nevertheless, inside the C++ community several implementations of hash
tables are available.
Libraries typically provide four kinds of hash tables: hash_set,
hash_multiset,
hash_map, and hash_multimap. According to the other associative containers,
the multi
versions allow duplicates and maps contain key/value pairs. Bjarne
Stroustrup discusses
hash_map as an example of a supplemented STL container in detail in Section
17.6 of his book
The C+ + Programming Language, 3rd edition. For a concrete implementation of
hash containers,
see, for example, the "STLport" (
http://www.stlport.org/). Note that
different implementations
may differ in details because hash containers are not yet standardized.