RE: [ROOT] TString 2-D array problem

From: Philippe Canal (pcanal@fnal.gov)
Date: Thu Mar 25 2004 - 21:08:13 MET


Hi,

This syntax is not supported in CINT.
For ACLiC you should use
#ifdef __MAKECINT__
TString a[2][2];
TString b[2][2];
#else
TString a[2][2] = {"test1","test2","test3","test4"};
TString b[2][2] = {{"test1","test2"},{"test3","test4"}};
#endif

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Dongwook Jang
Sent: Thursday, March 25, 2004 1:18 AM
To: roottalk@cern.ch
Subject: [ROOT] TString 2-D array problem


Hi,

I got an error when I do the following,

root [1] TString a[2][2] = {"test1","test2","test3","test4"};
root [2] TString b[2][2] = {{"test1","test2"},{"test3","test4"}};
Error: Symbol {"test1","test2"} is not defined in current scope
FILE:(tmpfile) LINE:1
Error: Symbol {"test3","test4"} is not defined in current scope
FILE:(tmpfile) LINE:1
*** Interpreter error recovered ***

The first line works for CINT but not for ACLiC.
The second line doesn't work for CINT and ACLiC.

I'm not sure this is the limitation of CINT/ACLiC.
This was tested with 3.10.02 + gcc2.96 in linux and gcc3.2 in cygwin.

Thank you for any help.

Dongwook Jang.


#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET