RE:[CINT] Re: [ROOT] A problem in bstring.h

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Sun Jan 20 2002 - 13:35:30 MET


Hello Sugaya-san and Rene,

is_open() is missing in libstrm.cxx, indeed. Other setups,
like vcstrm.cxx, bcstrm.cxx, gcc3strm.cxx all have this one.
I'll add this function in next release.

Thank you
Masaharu Goto


>Date: Sun, 20 Jan 2002 18:45:25 +0900
>From: sugayam@post.kek.jp
>To: brun@pcbrun.cern.ch
>Cc: sugayam@post.kek.jp, cint@pcroot.cern.ch, roottalk@pcroot.cern.ch
>Subject: [CINT] Re: [ROOT] A problem in bstring.h
>
>Masahiro Sugaya---------------------------
>Address: 1-1 Oho, Tsukuba, Ibaraki 305-0801 Japan
>Office:         0298-79-6123
>Mail:   sugayam@post.kek.jp
>From: Rene Brun <brun@pcbrun.cern.ch>
>Subject: Re: [ROOT] A problem in bstring.h
>Date: Sun, 20 Jan 2002 10:11:14 +0100 (MET)
>Message-ID: <Pine.LNX.4.04.10201201008210.11432-100000@pcbrun.cern.ch>
>Hi rooters.
>
>Well I didn't write enough infomation in the previous mail.
>My root version is the latest version fetched from CVS. 
>
>I changed the script as Brun said. But the error occurs.
> 
>------test.C--------
>#include <string>
>void test() {
> ifstream fi("test.dat");
> //cout << fi.is_open() << endl;
> string t;
> fi >> t;
> cout << t << endl;
>}
>
>root[1] .x test.C
>Error: Symbol i is not defined in current scope  FILE:bstring.h LINE:2523
>Error: Failed to evaluate i.operatorvoidError: Binary operator oprand missing
 
FILE:bstring.h LINE:2523
>*** Interpreter error recovered ***
>
>
>> Hi Masahiro,
>> 
>> There are several functions of ifstream currently not accessible from
>> CINT.
>> Masa may want to comment on this.
>> 
>> You can run your test in the following way:
>> 
>
>> 
>> 
>> Rene Brun
>> 
>> On Sun, 20 Jan 2002 sugayam@post.kek.jp wrote:
>> 
>> > 
>> > Hi rooters,
>> > I have some problems using fstream in the root script.
>> > 
>> > My root ver. is 3.02/07. linux redhat 6.1.
>> > 
>> > The probrem is that next script test.C doesn't work well.
>> > -----test.C----------
>> > {
>> > ifstream fi("test.dat");
>> > cout << fi.is_open() << endl;
>> > string t;
>> > fi >> t;
>> > cout << t << endl;
>> > }
>> > 
>> > The error output is
>> > root[1] .x test.C
>> > ==> ifstream::is_open () in current scope FILE:test.C LINE:3 
>> > ==> Possible candidates are...
>> > ==> Possible candidates are...
>> > ==> filename       line:size busy function type and name  (in ifstream)
>> > ==> filename       line:size busy function type and name  (in fstreambase
)
>> > ==> filename       line:size busy function type and name  (in ios)
>> > ==> filename       line:size busy function type and name  (in istream)
>> > ==> filename       line:size busy function type and name  (in ios)
>> > ==> *** Interpreter error recovered ***Possible candidates are...
>> > ==> filename       line:size busy function type and name  (in ifstream)
>> > ==> filename       line:size busy function type and name  (in fstreambase
)
>> > ==> filename       line:size busy function type and name  (in ios)
>> > ==> filename       line:size busy function type and name  (in istream)
>> > ==> filename       line:size busy function type and name  (in ios)
>> > ==> *** Interpreter error recovered ***
>> > 
>> > So I commented out the line of cout << fi.is_open() << endl; 
>> > -----test.C----------
>> > {
>> > ifstream fi("test.dat");
>> > //cout << fi.is_open() << endl;
>> > string t;
>> > fi >> t;
>> > cout << t << endl;
>> > }
>> > 
>> > but it said 
>> > 
>> > root[1] .x test.C
>> > ==> Error: Symbol i is not defined in current scope  FILE:bstring.h 
LINE:2523
>> > ==> Error: Failed to evaluate i.operatorvoidError: Binary operator oprand
 
missing FILE:bstring.h LINE:2523
>> > ==> *** Interpreter error recovered ***
>> > 
>> > 
>> > Masahiro Sugaya---------------------------
>> > Address: 1-1 Oho, Tsukuba, Ibaraki 305-0801 Japan
>> > Office:     0298-79-6123
>> > Mail:       sugayam@post.kek.jp
>> > 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:39 MET