Hi,
It is the first time I use TMap
, so I’m not sure if I’m using it properly or is better to use std::map
.
The question is that if I do:
TMap* map = new TMap();
map->Add("R", 3);
I get:
In file included from input_line_9:1:
/mnt/d/Sync1/Estudios/IFICCSIC/JAEICUIFIC2122/MadGraph/Project2/pp2ttbarllbar_SMEFTsim_analysis/xs_param.c:54:7: error: no matching member function for call to 'Add'
map->Add("R", 3);
~~~~~^~~
/mnt/d/Debian/ROOT/ROOT6.24.06/include/TMap.h:61:22: note: candidate function not viable: no known conversion from 'const char [2]' to 'TObject *' for 1st argument
void Add(TObject *key, TObject *value);
^
/mnt/d/Debian/ROOT/ROOT6.24.06/include/TMap.h:60:22: note: candidate function not viable: requires single argument 'obj', but 2 arguments were provided
void Add(TObject *obj);
^
The thing is that "R"
and 3
are not TObjetc
but I would like to use them in a dictionary/map.
ROOT Version:ROOT 6.24/06
Platform: Debian, Windows Subsystem for Linux
Compiler: Not Provided