std::map and root

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Sun, 13 Nov 2011 00:21:23 +0100


Hello,

just wondering if you would have an idea on this :

std::map<string,TH1*> hmap;

std::map<std::string,TH1*>::const_iterator hiter(hmap.begin());

-->Error: Can't call iterator::iterator(hmap.begin()) in current scope

thank you

here is the log :
root -b


ROOT 5.30/00 (tags/v5-30-00_at_40062, Aug 12 2011, 16:25:34 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] std::map<string,TH1*> hmap

RooFit v3.16 -- Developed by Wouter Verkerke and David Kirkby

                 Copyright (C) 2000-2011 NIKHEF, University of California 
& Stanford University
                 All rights reserved, please read 
http://roofit.sourceforge.net/license.txt

root [1] std::map<std::string,TH1*>::const_iterator hiter(hmap.begin()) Error: Can't call iterator::iterator(hmap.begin()) in current scope (tmpfile):1:
Possible candidates are...
Error: class,struct,union or type iterator not defined (tmpfile):1: *** Interpreter error recovered ***
root [2] .q Received on Sun Nov 13 2011 - 00:21:29 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 14 2011 - 23:50:02 CET