Re: Hashmaps

From: Greg Comeau (comeau_at_panix.com)
Date: 12/05/03


Date: 5 Dec 2003 12:07:59 -0500

In article <kM1Ab.201$rP6.200@newsread2.news.pas.earthlink.net>,
Jon Cosby <qwerty@nospam.net> wrote:
>"Robert W Hand" <rwhand@NOSPAMoperamail.com> wrote in message
>news:00hvsvopnm5gdqm3k4jvrbm1ps7elg0rar@4ax.com...
>> On Sat, 29 Nov 2003 17:10:01 GMT, "Jon Cosby" <qwerty@abc.net> wrote:
>>
>> > hash_map <int, string> hm1;
>> > typedef pair <int, string> str_pair;
>> >
>> > hm1.insert(str_pair(1, "Hello"));
>> >
>> >crashes, pointing to something in "xhash". Is there a brief tutorial on
>> >this
>> >somewhere?
>>
>> I am not aware that hash_map is in the C++ Standard. SGI has come
>> information at
>>
>> http://www.sgi.com/tech/stl/hash_map.html
>>
>> Dinkum has information about it too, but I cannot get them online at
>> present. Other vendors who offer it as an extension may also have
>> documentation papers. Lastly, there are books since it is a common
>> extension with several different implementations.
>> --
>
>Thanks for the info. No, I guess it's not part of the standard C++ library.
>VC lists it so, though.

(Jumbo ellie phant take note of what Jon just said -- see
how misinformation sometimes gets spread by MS documentation?
(In fairness, this is not just an MS problem.))

Robert is correct, there is no hash_map in standard C++.
However, many implementations provide (different) ones
(libcomo has what I'll call a defunct one, since it's not
supported by Standard C++). Furthermore, the C++ Library
TR (Technical Report), which is not part of any Standard C++,
contains one, and it's _likely_ to become part of C++0x,
perhaps with some modifications still.

-- 
Greg Comeau/4.3.3:Full C++03 core language + more Windows backends
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?


Relevant Pages

  • Re: OT Software to fill out forms
    ... If "they" could at least agree to use a standard 8x11 piece of paper ... ie find the form online and use word or adobe ... online is better as I use autocomplete alot, saves me mucho time. ...
    (microsoft.public.windowsxp.general)
  • Re: Great SWT Program
    ... what I find strange is that you call them "rights". ... any objection to your defining a standard of behavior that you ... and consumers online. ... (government regulation?), but -- could be. ...
    (comp.lang.java.programmer)
  • Re: Great SWT Program
    ... what I find strange is that you call them "rights". ... any objection to your defining a standard of behavior that you ... and consumers online. ... Between attempts at government or big business ...
    (comp.lang.java.programmer)
  • IE 6.0 can not acess the internet, possible virus corruption.
    ... the page came up as the standard 404 error, ... My dad's computer was able to immediately go online ... computer is seeing the network becuase it can see the ...
    (microsoft.public.windows.inetexplorer.ie6.browser)