RE: [ROOT] cout << string ?

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Feb 24 2004 - 01:44:59 MET


Hi Troy,

This problem has been fixed in ROOT 4.00/02.

For 3.10/02 you can use:
root [0] #include <string>
root [1] string s = "foo";
root [2] cout << s.c_str();

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Troy Straszheim
Sent: Monday, February 23, 2004 3:26 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] cout << string ?


Hi roottalk --

I have verified that this works on another machine here, but for some
reason it is not working on mine.  I'm wondering if somebody can give me a
hint on where to start trying to track this down:

root [0] #include <string>
root [1] string s = "foo";
root [2] cout << s
Error: operator<< not defined for basic_ostream<char,char_traits<char> >
FILE:(tmpfile) LINE:1

This appears to be related to other errors where the interpreter is unable
to convert a string literal ("foo") to a const string&.

This is with root 3.10.02, have tried with gcc-3.2.3 and gcc-3.3.2-r5.

Thanks in advance,

Troy Straszheim



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