Using map<int, string> problem

I want to use

map<int, string> par_map;
string str(“ASDRT”);

par_map[5] = str;

I have Error: Can’t call map<int,string,less,allocator<pair<const int,string> > >:
:astonished:perator in current scope C:\root\macros\rhop1.c(255)
Possible candidates are…
(in map<int,string,less,allocator<pair<const int,string> > >)
Error: improper lvalue C:\root\macros\rhop1.c(255)
(class string)75749368
What can I do to avoid this?

Hi,

You need to generate the dictionary for map<int,string>.

Cheers,
Philippe.

Use ACLiC on#include <map> #include <string> #ifdef __MAKECINT__ #pragma link C++ class map<int,string>; #endif