From: "Hiram Berry" Newsgroups: comp.os.msdos.djgpp,comp.lang.c++ Subject: Re: How should I use the Iterator with a map??? Date: 26 Jan 2000 13:29:37 EST Organization: Burning Bridges Design Studio Lines: 32 Message-ID: <86neeh$7@journal.concentric.net> References: <86mf46$4ua$1 AT news DOT lth DOT se> <5m4u8s87c42f2s9mldsrr7rgf6iaasu9fr AT 4ax DOT com> NNTP-Posting-Host: ts005d12.stp-fl.concentric.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick wrote in message news:5m4u8s87c42f2s9mldsrr7rgf6iaasu9fr AT 4ax DOT com... > On Wed, 26 Jan 2000 10:33:13 +0100, "Niklas Pettersson" > wrote: > You might get more help in comp.lang.c++. Crosspost added. > > >#include > >#include > > > >struct SymbolTableEntry // Dummy.. Just to illustrate.. ... > >map symboltable_rep; ... > > map::iterator i( symboltable_rep.begin() ); > > SymbolTableEntry *current = 0; ... > > // ERROR HERE!!! > > // > > current = *i; // Get contents of iterator... ... I believe the value_type for maps is std::pair, so in this case I think you need to write current = i -> second; in order to get the SymbolTableEntry * value.