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

ATL / WTL / STL

 
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 
GeneralRe: copying items from a map to a list Pin
ZoogieZork10-Jul-03 12:29
ZoogieZork10-Jul-03 12:29 
If you're using an STL implementation with the select2nd SGI extension, then you can extract the values out of the pair easily (the following code example is for gcc):

#include <iostream>
#include <map>
#include <vector>
#include <ext/functional>
#include <algorithm>

using namespace std;
using namespace __gnu_cxx;

int main(int argc,char **argv) {

    map<int,int> mint;
    mint[0] = 1;
    mint[1] = 2;
    mint[2] = 3;

    vector<int> vals = vector<int>(3);
    transform(mint.begin(),mint.end(),vals.begin(),
        select2nd<map<int,int>::value_type>());
    
    for (vector<int>::const_iterator iter = vals.begin();
        iter != vals.end(); ++iter)
    {
        cout << *iter << endl;
    }
    
}


I can't check if select2nd is supported in VC's STL implementation right now, sorry Frown | :(

- Mike
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 
GeneralRe: STL vector sort. Pin
Jörgen Sigvardsson12-Aug-03 13:52
Jörgen Sigvardsson12-Aug-03 13:52 

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.