TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Mike N.
from: Geo
date: 2004-11-12 21:50:34
subject: Re: C++

From: "Geo" 

"Mike N."  wrote in message
news:8r99p0t8iip4qvea6bclngd47v258f5o67{at}4ax.com...

>   map counts;
>   counts[555] = 4;
>   counts[1832873] = 7;
>
>   This allocates only 2 elements instead of allocating a complete linear
> array from [0..1832873].

very efficient, so what happens if you then set

counts[555]=0

does it give back the space?

>   map counts;
>  string email='miken{at}example.com';
>  string email2='georger{at}nls.net';
>   counts[email] = 4;
>   counts[email2] = 7;
>
> The formal description is a container designed to provide direct access to
> store and retrieve elements via search keys.   A map container stores
> values associated with those keys.

I'm not sure I fully understand how this works but it looks pretty slick,
is it actually setting up 2 arrays to do this because the map function
looks like what I've always thought of as an array in a language where you
have a string$ type variable.

Geo.

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 396/45 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.