Problem with map of map

Dear all,

i would like to use a map<string,map<string,float>> and i do:

#include
#include
#include
using namespace std;
#pragma link C++ class map<string, map<string, float > >;
#pragma link C++ class pair<string, map<string, float > >;
map<string, map<string, float > > mappa;

if you try from CINT you and you do
mappa[“a”][“A”] = 1.1

you should get as for me:

Error: Can’t call map<string,map<string,float,less,allocator<pair<const string,float> > >,less,allocator<pair<const string,map<string,float,less,allocator<pair<const string,float> > > > > >::operator in current scope (tmpfile):1:
Possible candidates are…
(in map<string,map<string,float,less,allocator<pair<const string,float> > >,less,allocator<pair<const string,map<string,float,less,allocator<pair<const string,float> > > > > >)
Error: improper lvalue (tmpfile):1:
(const double)1.10000000000000009e+00
*** Interpreter error recovered ***

I’m using ROOT 5.22 on MacOsX 10.5.6.
Am i doing some error creating the dictionary ?

Thanks a lot for your comments!
Cheers,
Max

[quote]Am i doing some error creating the dictionary ? [/quote]Most likely. How do you create and load the dictionary. I took your example, but I had to remove the #include which does not exist in gcc, surrounded the #pragma with #ifdef CINT for good measure and loaded via ACLiC:root [0] .L nmap.C+ Info in <TUnixSystem::ACLiC>: creating shared library /var/tmp/./nmap_C.so root [1] mappa["a"]["A"] (float)0.00000000000000000e+00 root [2] mappa["a"]["A"] = 1.1 (const double)1.10000000000000009e+00

Cheers,
Philippe