[ROOT] string streams for gcc-3

From: Jiri Masik (masik@pc203b.fzu.cz)
Date: Thu Jan 17 2002 - 10:00:26 MET


Hi,

I've been using stringstreams to compose object names within Root but
it doesn't work anymore on installations with gcc-3. For example
ostrstream.str() doesn't return char* as it should but basic_ostream...

root [0] ostrstream buf; buf << 1 << ends; cout << buf.str() << endl;
Error: operator<< not defined for basic_ostream<char,char_traits<char> > FILE:/tmp/fileK3crvx_cint LINE:1

I'd rewrite the code with ostringstream which should be more standard
but it suffers the same problem I can't copy stringstream contents
onto a string.

Is there a way how to do it without moving to C-style string
management? I'm running 3.02-07 on linuxdeb2ppc/gcc-3.0.3. The same
version compiled with gcc-2.95 works fine. 

cheers
        Jiri



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