473,473 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

STL hash<> function - where is the header?

STL has a hash function documented here: http://www.sgi.com/tech/stl/hash.html

What header do I include? I can't find it defined anywhere in the MSVC
headers.

I'm using MSVC8, BTW. Sorry if this is the wrong forum!

p

Apr 9 '07 #1
2 5268
cr*****@gmail.com wrote:
STL has a hash function documented here: http://www.sgi.com/tech/stl/hash.html
That page document's SGI's version of the Standard Template Library.
What header do I include? I can't find it defined anywhere in the MSVC
headers.

I'm using MSVC8, BTW. Sorry if this is the wrong forum!
MSVC8 has an implementation of the C++ Standard Library. That's not the
same thing as STL. The C++ Standard Library doesn't have hashed
containers or a hash template.

TR1 (a recommendation, not a requirement) provides the hashed containers
unordered_set, unordered_multiset, unordered_map, and
unordered_multimap, as well as a hash template. The various hashed
containers are defined in <unordered_setand <unordered_map>, and the
hash template is in <functional>. If youve got an implementation of TR1
that's where you'll find them. (For more information about TR1, see my
book, "The Standard C++ Library Extensions. Hashed containers are in
Chapter 5.)

The current draft of the next revision of the C++ standard also has
these templates, but that won't be official for a few years yet.

MS's library does have various hash_* containers, but you'll have to ask
for information about them on a Microsoft forum, or look at the
documentation on Dinkumware's web site (www.dinkumware.com).

--

-- Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com)
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." (www.petebecker.com/tr1book)
Apr 9 '07 #2
Thanks very much for this. Very much appreciated.

I'll take a look at boost. I'm sure it has a good one.

p

Apr 9 '07 #3

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

Similar topics

4
by: Hal Vaughan | last post by:
If I have a byte and I convert it to string (String sData = new String(byte bData), then convert it back (byte bData = sData.getBytes()), will all data be intact, or do Strings have problems with...
14
by: Dylan Nicholson | last post by:
Been playing around with this all day, and haven't found a solution I like yet. Assuming some initial function: void foo(std::string& src) { src += "some fixed string"; src += bar(); src...
1
by: sachin_mzn | last post by:
Hi, When we use find method over a STL map. which searching algorithm is used internally. Is it a hash search? Or map implementation internally decide depending on element. -Sachin
47
by: VK | last post by:
Or why I just did myArray = "Computers" but myArray.length is showing 0. What a hey? There is a new trend to treat arrays and hashes as they were some variations of the same thing. But they...
2
by: Georges Heinesch | last post by:
Hi: I have a tables in relationship to each other. When I open the main table (table 1), I see a "+" at the very left of every record. Clicking on the "+" expands the data of the linked table...
0
by: Uwe Hoffmann | last post by:
Hi, i have used Pyrex to build some python Extensionclasses. Now i stumbled over the fact that if a subclass has a __hash__ method the __richcmp__ of the base is not called. # pseudocode ...
14
by: dananrg | last post by:
Been using the ODBC module for Python 2.1 (Win32) and had another question. When I return data from date columns, it's in a strange object form, e.g. <something or other> (don't have the output in...
3
by: newbie | last post by:
Same thing g++ complains when using hash_map<>, but is happy with map<--I understand hahs_map is not standardized, but since the compiler didn't complain something like 'hash_map<not defined', I...
2
by: Markus Dehmann | last post by:
Hi, I'd like to hash std::vector<intobjects using hash_set, but I'm not sure what hash function to use. Does anybody have a suggestion? Thank you! Markus
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.