Hello George Thank you for your report. Unfortunately, this is one of hard cint limitation which is difficult to fix. Please find workaround. Masaharu Goto >Date: Fri, 06 Oct 2000 12:47:33 -0400 >From: "George A. Heintzelman" <gah@bnl.gov> >To: Masaharu Goto <MXJ02154@nifty.ne.jp> >Subject: CINT scoping problem > > >Masaharu, > >I've discovered something that I think is a CINT scoping problem. > >I tried to do this: > >int main() { > { > const char str[] = "Hello world."; > cout << str << endl; > } > > { > const TString str = "Hello world."; > cout << str.Data() << endl; > } > > return 1; >} > >loaded it in root, and got the following from CINT (5.14.47): >root [0] .L cintscope.C >root [1] main() >Hello world. >Error: non class,struct,union object str used with . or -> >FILE:cintscope.C LINE:11 >(class G__CINT_ENDL)140565600 >*** Interpreter error recovered *** > >So it looks like CINT is not recognizing that at the first '}', the >name str should go out of scope and be completely replaceable. > >The code compiles and works fine with g++ (with appropriate #includes >and libraries, of course), producing two lines of 'Hello world.' > >George Heintzelman >gah@bnl.gov > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:35 MET