STL Map

From: Justace Clutter <prophecy_at_corpranet.net>
Date: Wed, 28 Jun 2006 15:28:17 -0500


I was trying to just test to see about using a map, so I went to the SGI page for the STL and was just kind of going though the example. The following is what I got.. Do I need to load a special version of root to do this?

Justace

P.S. I am at FNAL running D0RunII p18.07.00


Compiled on 16 March 2006 for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.169, Mar 14 2005 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }.

root [0] #include <map>
root [1] std::map<const char*, int> months;
root [2] months["january"] = 31;

Error: Can't call map<const char*,int,less<const char*>,allocator<pair<const char* const,int> > >::operator[]((char*)0x8fde40c) in current scope FILE: (tmpfile) LINE:1
Possible candidates are...
filename line:size busy function type and name (in map<const char*,int,less<const char*>,allocator<pair<const char* const,int> > >) Error: improper lvalue FILE:(tmpfile) LINE:1 *** Interpreter error recovered *** Received on Wed Jun 28 2006 - 22:31:59 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET