Hi Alexis, CINT seems to currently bark on your line: char *const ScalHist::sc_types[3]={"PMS","1","1/2"}; we will fix it soon. In the meantime, you can use ACLiC by hidding the line from CINT: #ifndef __CINT__ char *const ScalHist::sc_types[3]={"PMS","1","1/2"}; #endif and .L UniFluct.cpp++ will work. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of mignon@ganil.fr Sent: Thursday, March 21, 2002 9:48 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] TClonesArray "may not use this method" hi, I use a ScalHist class (contained in UniFluct.cpp and UniFluct.h) which contains a variable declared as static char *const sc_types[3]; and initialized as char *const ScalHist::sc_types[3]={"PMS","1","1/2"}; it compiles fine with g++, but when i try to load the class in cint with .L UniFluct.cpp i get this error message Error: array initialization FILE:/lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct.cpp LINE:26 Warning: Automatic variable "1" allocated in global scope FILE:/lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct.cpp LINE:26 Error: Undeclared variable "1" FILE:/lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct.cpp LINE:26 *** Interpreter error recovered *** and with .L UniFluct.cpp++ Info in <ACLiC>: creating shared library /lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct_cpp.so Error: array initialization FILE:/lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct.cpp LINE:26 Syntax Error: "1/2" Maybe missing ';' FILE:/lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct.cpp LINE:26 Error: Too many '}' FILE:/lhome/lmignon/Projects/randunifluct/randunifluct/UniFluct.cpp LINE:26 So what is the problem ? How can I solve it ? -- Alexis Mignon GANIL Bd Henri Becqurel 14076 CAEN Cedex 5 France tel: +(33) (0)231454680 e-mail : mignon@ganil.fr
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:47 MET