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

ATL / WTL / STL

 
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 
Here is a example that should work. It was a bit hard to read your code before, since all the bits between the < and > were thought to be html tags.

#include <map>
#include <string>
#include <utility>

void main()
{
std::map< std::pair<std::string, int*> , std::string> test;

int *value = new int;

// some useful processing ....
test.insert( std::make_pair( std::make_pair( std::string("hello"), 35), value) );

return;
}


But this is the way I prefer to do it, I find it much tidier:


void main()
{
typedef std::pair<std::string, int*> MyKey;
typedef std::map< MyKey , std::string> MyMap;

MyMap test;

int *value = new int;

// some useful processing ....
test[MyKey("hello", 35)] = value;

return;
}
Hopefully helpful,
Phil


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 
GeneralAdding ATL Simple object Pin
Yoav Zur30-Jun-03 20:28
Yoav Zur30-Jun-03 20:28 
GeneralRe: Adding ATL Simple object Pin
Anonymous1-Jul-03 0:20
Anonymous1-Jul-03 0:20 
GeneralMessage Reflection for WM_CTLCOLORSTATIC Pin
Tommy2k30-Jun-03 3:20
Tommy2k30-Jun-03 3:20 
GeneralRe: Message Reflection for WM_CTLCOLORSTATIC Pin
Thomas A. Rieck4-Jul-03 8:10
Thomas A. Rieck4-Jul-03 8:10 
GeneralRe: Message Reflection for WM_CTLCOLORSTATIC Pin
Tommy2k4-Jul-03 9:25
Tommy2k4-Jul-03 9:25 
GeneralRe: Message Reflection for WM_CTLCOLORSTATIC Pin
Thomas A. Rieck4-Jul-03 12:20
Thomas A. Rieck4-Jul-03 12:20 
GeneralProblem setting includes directory in VS.NET03 Pin
TigerNinja_29-Jun-03 14:08
TigerNinja_29-Jun-03 14:08 
GeneralRe: Problem setting includes directory in VS.NET03 Pin
TigerNinja_29-Jun-03 15:54
TigerNinja_29-Jun-03 15:54 
GeneralRe: Problem setting includes directory in VS.NET03 Pin
Steve S17-Jul-03 1:55
Steve S17-Jul-03 1:55 
QuestionHow to catch change of the stock property in ActiveX control? Pin
awaken7325-Jun-03 23:33
awaken7325-Jun-03 23:33 

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.