473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hash Table

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
Jul 22 '05 #1
4 4230
"Pelo GANDO" <o0****@hotmail .com> wrote in message
news:c1******** **@news-reader1.wanadoo .fr...
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.

[/quote]

--

Elias
Jul 22 '05 #2
Thanks Lallous,

But, I just want a brief code of an hash table..Has someone got any link ?
Just need a brief example...

Thank you very much...

"lallous" <la*****@lgwm.o rg> a écrit dans le message de news:
c1************* @ID-161723.news.uni-berlin.de...
"Pelo GANDO" <o0****@hotmail .com> wrote in message
news:c1******** **@news-reader1.wanadoo .fr...
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.

[/quote]

--

Elias

Jul 22 '05 #3
"Pelo GANDO" <o0****@hotmail .com> wrote in message
news:c1******** **@news-reader2.wanadoo .fr...
Thanks Lallous,

But, I just want a brief code of an hash table..Has someone got any link ?
Just need a brief example...

Thank you very much... As the other post suggested, you might find some hash table code implemented
in the STLport.

I am sure that if you google for "C++ Hash table source code" you will find
lots of code too.

--
Elias
"lallous" <la*****@lgwm.o rg> a écrit dans le message de news:
c1************* @ID-161723.news.uni-berlin.de...
"Pelo GANDO" <o0****@hotmail .com> wrote in message
news:c1******** **@news-reader1.wanadoo .fr...
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.

[/quote]

--

Elias


Jul 22 '05 #4
Thank you,

I'm going to search on google if I find some...

P.S. Apologize for my english because it is not my native tongue
"lallous" <la*****@lgwm.o rg> a écrit dans le message de news:
c1************* @ID-161723.news.uni-berlin.de...
"Pelo GANDO" <o0****@hotmail .com> wrote in message
news:c1******** **@news-reader2.wanadoo .fr...
Thanks Lallous,

But, I just want a brief code of an hash table..Has someone got any link ?
Just need a brief example...

Thank you very much... As the other post suggested, you might find some hash table code

implemented in the STLport.

I am sure that if you google for "C++ Hash table source code" you will find lots of code too.

--
Elias

"lallous" <la*****@lgwm.o rg> a écrit dans le message de news:
c1************* @ID-161723.news.uni-berlin.de...
"Pelo GANDO" <o0****@hotmail .com> wrote in message
news:c1******** **@news-reader1.wanadoo .fr...
> 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.
[/quote]

--

Elias



Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
14431
by: pembed2003 | last post by:
Hi All, Does C++/STL have hashtable where I can do stuff like: Hashtable h<int>; h.store("one",1); h.store("two",2); and then later retrieve them like:
7
22324
by: Matthias Käppler | last post by:
Hi, I need to store objects of a FileInfo class containing information about a specific file. I can uniquely identify these files by their serial number. I thought it would be a good idea to use a hash map so I can access the file information in constant time, without having to iterate over a (possibly very large) list of files. As far...
2
2513
by: Ravi | last post by:
Hi, I am working on a winform app. I need to use an object which can store some information(key/value pairs) and also can be acessed by multiple threads(read/write). From what I heard Hash table is best suited for it. My question is Why hash table. why can't we use an array. I thought hash table uses more memory than array. Correct me if am...
21
3173
by: Johan Tibell | last post by:
I would be grateful if someone had a minute or two to review my hash table implementation. It's not yet commented but hopefully it's short and idiomatic enough to be readable. Some of the code (i.e. the get_hash function) is borrowed from various snippets I found on the net. Thee free function could probably need some love. I have been...
44
6663
by: gokkog | last post by:
Hi there, There's a classic hash function to hash strings, where MULT is defined as "31": //from programming pearls unsigned int hash(char *ptr) { unsigned int h = 0; unsigned char *p = ptr;
11
2662
by: Douglas Dude | last post by:
how much time does it take to lok for a value - key in a hash_map ? Thanks
139
14055
by: ravi | last post by:
Hi can anybody tell me that which ds will be best suited to implement a hash table in C/C++ thanx. in advanced
1
3408
by: jacob navia | last post by:
Everybody knows that hash tables are fast. What is less known is that perfect hash tables are even faster. A perfect hash table has a hash function and a table layout that avoids collisions completely. You can lookup a key in the table with a single hash function call. What is even less known is that there is a perfect software for...
6
10032
by: j1mb0jay | last post by:
I am currently working on a dictionary populating program. I currently have a socket connection my local news server and am trawling through all of the articles looking for new words. I am currently using Java to do this but would like to move the source to C#. Java's String class has a method that hashes strings. I was wondering if C# has a...
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.