adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Charedit File Format


From: Kai Sterker
Subject: Re: [Adonthell-devel] Charedit File Format
Date: Wed, 15 Aug 2007 20:46:19 -0700

On 8/15/07, Andrew Phillips <address@hidden> wrote:

> My apologies on replying to myself. Am I right in thinking that the
> hash table you're thinking of is also known as a map? A map seems to
> bear the closest resemblance (near perfect) to the associative array
> you've described.

map will work fine, but there is also hash_map, which is the "real
thing". If for some reason, element order is important, map is the one
to use.

I usually keep a link to the STL documentation close. Even though it
is quite technical and often lacks sample code, it's a good starting
point:
  http://www.sgi.com/tech/stl/table_of_contents.html

For some examples on map usage, see base/configuration. hash_map is
used in rpg/character.

If you decide to use hash_map, you'll probably find base/hash_map.h to
be useful. It implements a hash function for std::string and contains
compatibility code for g++ 2.x and later versions.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]