0
Answer

Hash Tables

William Thompson

William Thompson

16y
3.2k
1

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 be
used to replace your compiler's STL if that is found wanting. In
addition 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 and
fast concatenation and substring operations).

The hasp_map header is not part of the standard C++ STL. It is an
extension 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 files
I 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.h
algobase.h
algorithm
alloc.h
bitset
bvector.h
char_traits.h
concept_checks.h
container_concepts.h
defalloc.h
deque
deque.h
function.h
functional
hashtable.h
hash_map
hash_map.h
hash_set
hash_set.h
heap.h
iterator
iterator.h
limits
list
list.h
map
map.h
memory
multimap.h
multiset.h
numeric
pair.h
pthread_alloc
pthread_alloc.h
queue
rope
rope.h
ropeimpl.h
sequence_concepts.h
set
set.h
slist
slist.h
stack
stack.h
stdexcept
stl_algo.h
stl_algobase.h
stl_alloc.h
stl_bvector.h
stl_config.h
stl_construct.h
stl_ctraits_fns.h
stl_deque.h
stl_exception.h
stl_function.h
stl_hashtable.h
stl_hash_fun.h
stl_hash_map.h
stl_hash_set.h
stl_heap.h
stl_iterator.h
stl_iterator_base.h
stl_list.h
stl_map.h
stl_multimap.h
stl_multiset.h
stl_numeric.h
stl_pair.h
stl_queue.h
stl_range_errors.h
stl_raw_storage_iter.h
stl_relops.h
stl_rope.h
stl_set.h
stl_slist.h
stl_stack.h
stl_string_fwd.h
stl_tempbuf.h
stl_threads.h
stl_tree.h
stl_uninitialized.h
stl_vector.h
string
tempbuf.h
tree.h
type_traits.h
utility
valarray
vector
vector.h

Next Recommended Forum