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?
The SGI STL (free available at Standard Template Library Programmer's Guide --http://www.sgi.com/Technology/STL )
is one of the most robust implementations of the STL, and can beused to replace your compiler's STL if that is found wanting. Inaddition they've added a menber of extensions including hash_set,hash_multiset, hash_map, hash_multimap, slist (a singly-linked lest)and rope (a variant of string optimized for verylarge strings andfast concatenation and substring operations).
The hasp_map header is not part of the standard C++ STL. It is anextension that is only available as part of the SGI STL.
I downloaded these header files and I copied them into the directory:C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include>
I wrote a little test program (more about this later) and I tried to compile.I got a C2061 error because when I copied the SGL STL header filesI should have merged the code instead.
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdlib.h(360) : error C2061: syntax error : identifier '_CountofType'
So, where is '_CountofType' defined?
I need some help.
Can someone tell me where I can get the original header files?
Here is the list of SGI STL header files:
algo.halgobase.halgorithmalloc.hbitsetbvector.hchar_traits.hconcept_checks.hcontainer_concepts.hdefalloc.hdequedeque.hfunction.hfunctionalhashtable.hhash_maphash_map.hhash_sethash_set.hheap.hiteratoriterator.hlimitslistlist.hmapmap.hmemorymultimap.hmultiset.hnumericpair.hpthread_allocpthread_alloc.hqueueroperope.hropeimpl.hsequence_concepts.hsetset.hslistslist.hstackstack.hstdexceptstl_algo.hstl_algobase.hstl_alloc.hstl_bvector.hstl_config.hstl_construct.hstl_ctraits_fns.hstl_deque.hstl_exception.hstl_function.hstl_hashtable.hstl_hash_fun.hstl_hash_map.hstl_hash_set.hstl_heap.hstl_iterator.hstl_iterator_base.hstl_list.hstl_map.hstl_multimap.hstl_multiset.hstl_numeric.hstl_pair.hstl_queue.hstl_range_errors.hstl_raw_storage_iter.hstl_relops.hstl_rope.hstl_set.hstl_slist.hstl_stack.hstl_string_fwd.hstl_tempbuf.hstl_threads.hstl_tree.hstl_uninitialized.hstl_vector.hstringtempbuf.htree.htype_traits.hutilityvalarrayvectorvector.h