From -1796637711944632322
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,4794e7315c3d58e4
X-Google-Attributes: gidf78e5,public
X-Google-Thread: 109fba,4794e7315c3d58e4
X-Google-Attributes: gid109fba,public
From: Alexandre Oliva <oliva@dcc.unicamp.br>
Subject: Re: STL newcomer needs help!!!
Date: 1998/04/16
Message-ID: <or3efda62k.fsf@narizinho.lsd.dcc.unicamp.br>#1/1
X-Deja-AN: 345443966
X-NNTP-Posting-Host: narizinho.lsd.dcc.unicamp.br
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <3535871e.0@news1.ibm.net>
X-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=US-ASCII
X-Emacs: 20.4 "Emerald" XEmacs  Lucid without mule
Organization: IC - UNICAMP - Campinas, SP, Brazil
Mime-Version: 1.0 (generated by SEMI 1.2.0 - "Nishiizumi")
Newsgroups: comp.std.c++,comp.lang.c++
Originator: clamage@taumet


Steve Clamage writes:

[ I'm pretty sure it wasn't Steve who wrote this, but that's what the
From: header says...  Is this a bug in the moderation software? -oliva ]

> multimap<key_t, vector<component_t>, less<key_t> >  vector_map;

> This at least compiles without error, but I have yet to find an
> effective method for looking at all vectors associated with a given
> key.

Use the equal_range(const key_type&) member function.  It returns a
pair P of iterators so that [P.first, P.second) is the interval from
the first occurrence of the given key to one past the last occurrence
of it.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




