Click here to Skip to main content
15,913,408 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: HTML parsing... Pin
Heath Stewart11-Jul-03 8:30
protectorHeath Stewart11-Jul-03 8:30 
GeneralWindow Class :: richedit implementation error! Pin
tareqsiraj10-Jul-03 20:23
tareqsiraj10-Jul-03 20:23 
GeneralRe: Window Class :: richedit implementation error! Pin
Michael Dunn11-Jul-03 17:15
sitebuilderMichael Dunn11-Jul-03 17:15 
Generalcommand_id_handler Pin
harishv10-Jul-03 11:15
harishv10-Jul-03 11:15 
GeneralRe: command_id_handler Pin
Heath Stewart11-Jul-03 8:40
protectorHeath Stewart11-Jul-03 8:40 
GeneralRe: command_id_handler Pin
harishv14-Jul-03 5:10
harishv14-Jul-03 5:10 
Generalcopying items from a map to a list Pin
User 988510-Jul-03 10:40
User 988510-Jul-03 10:40 
GeneralRe: copying items from a map to a list Pin
Andrew Walker10-Jul-03 12:16
Andrew Walker10-Jul-03 12:16 
Yes, but it depends on the template types of the list and the map. Map contains a pair, so if you want to directly copy the pair it's easy. I'm guessing that's not what you want though. Could be harder if you just want one of the elements of the pair.

#include <string><br />
#include <list><br />
#include <map><br />
#include <algorithm><br />
<br />
using namespace std;<br />
<br />
int main()<br />
{<br />
    map<int,string> m;<br />
    list<pair<int,string> > l;<br />
    m[0] = "zero";<br />
    m[1] = "one";<br />
    m[2] = "two";<br />
    m[3] = "three";<br />
    std::copy(m.begin(),m.end(),std::back_inserter(l));<br />
<br />
    return 0;<br />
}



If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.

Rudyard Kipling

GeneralRe: copying items from a map to a list Pin
ZoogieZork10-Jul-03 12:29
ZoogieZork10-Jul-03 12:29 
QuestionHow to modify rcBounds CRect pass t o OnDraw Pin
bachelier9-Jul-03 4:25
bachelier9-Jul-03 4:25 
GeneralCAtlArray and ETraits::INARGTYPE Pin
Peter Weyzen8-Jul-03 16:34
Peter Weyzen8-Jul-03 16:34 
Generalpair as key of map Pin
Anonymous8-Jul-03 3:05
Anonymous8-Jul-03 3:05 
GeneralRe: pair as key of map Pin
AlexO8-Jul-03 3:44
AlexO8-Jul-03 3:44 
GeneralRe: pair as key of map Pin
Anonymous8-Jul-03 4:18
Anonymous8-Jul-03 4:18 
GeneralRe: pair as key of map Pin
AlexO8-Jul-03 4:37
AlexO8-Jul-03 4:37 
GeneralRe: pair as key of map Pin
Anonymous8-Jul-03 4:46
Anonymous8-Jul-03 4:46 
GeneralRe: pair as key of map Pin
AlexO8-Jul-03 6:32
AlexO8-Jul-03 6:32 
GeneralRe: pair as key of map Pin
Joaquín M López Muñoz8-Jul-03 6:48
Joaquín M López Muñoz8-Jul-03 6:48 
GeneralRe: pair as key of map Pin
Phil Martin7-Sep-03 14:57
professionalPhil Martin7-Sep-03 14:57 
GeneralRe: Message Reflection for WM_CTLCOLORSTATIC Pin
Michael Dunn6-Jul-03 20:30
sitebuilderMichael Dunn6-Jul-03 20:30 
GeneralEmbed and Automate a Microsoft Excel Worksheet with MFC Pin
Mardigin6-Jul-03 18:09
Mardigin6-Jul-03 18:09 
GeneralWas able to remove... Pin
Mardigin13-Jul-03 5:01
Mardigin13-Jul-03 5:01 
GeneralSTL vector sort. Pin
73Zeppelin3-Jul-03 7:33
73Zeppelin3-Jul-03 7:33 
GeneralRe: STL vector sort. Pin
Michael Dunn3-Jul-03 7:43
sitebuilderMichael Dunn3-Jul-03 7:43 
GeneralRe: STL vector sort. Pin
Alexandru Savescu3-Jul-03 23:15
Alexandru Savescu3-Jul-03 23:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.