Re: STL set

From: Sebastien Binet <binet_at_cern.ch>
Date: Tue, 20 Apr 2010 15:22:05 +0200


Excerpts from Roger Mason's message of 2010-04-20 15:16:30 +0200:
> Hello,
>
> I am trying to use the STL set container in a script. Here is a minimal
> example:
>
> #include <set>
>
> #include "TRandom1.h"
>
> void XfromY(Int_t x, Int_t y) {
>
> TRandom1 R;
> set<Int_t> s;
>
> }
>
> I load and run the script as follows:
>
> root [0] .L XfromY.C
> root [1] XfromY(10,14)
> Error: Symbol set<Int_t>s is not defined in current scope XfromY.C:8:
> *** Interpreter error recovered ***
>
> Am I doing something wrong or is CINT incapable of using the STL?

what about using std::set ? :P

(to cite a snake-ish language motto: namespaces are a honking good idea, let's use loads of them)

cheers,
sebastien.

-- 
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
Received on Tue Apr 20 2010 - 15:22:48 CEST

This archive was generated by hypermail 2.2.0 : Wed Apr 21 2010 - 17:50:01 CEST