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

ATL / WTL / STL

 
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 
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 
I need to have a pair of std::string and int as key of the map. But doesn't seems to work. I am using Visual Studio 6.

Here is the test program i am trying

#pragma warning (disable:4786)

#include <iostream>
#include <string>
#include
#include <vector>
using namespace std;

#include <myclass.h>


void main()
{
map< pair<string, int="">, string> test;

CMyClass* c = new CMyClass();

// some useful processing ....

test.insert( pair< pair<string,int>,CMyClass*> > (("hello",35), c));


return;
}

Get folloowing error
error C2275: 'pair<struct std::pair<class="" std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,int>,class CMyClass *>' : illegal use of this type as an expression

When i change key from pair<string,int> to something non-pair, it works fine. Any idea? is it doable at all?

TIA
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 
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 

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.