It seems to me I have found the related topics: http://root.cern.ch/phpBB2/viewtopic.php?t=442&highlight= and http://root.cern.ch/root/roottalk/roottalk04/0097.html Anyway I was not able to reproduce the crash. The only problem I found calling from CINT interactive session: TString W = "Hello World"; cout<<W<<endl; // there is no output cout<<(const char *)W<<endl; // it is Ok Hello World ---- Best regards Valeri > -----Original Message----- > From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch] On > Behalf Of Andreas Zoglauer > Sent: Thursday, March 04, 2004 2:17 PM > To: roottalk@pcroot.cern.ch > Subject: [ROOT] Different behaviour (i.e. Crash) of TString on Linux and Windows > > > Hello, > > The following little program has different behaviour on windows and on > Linux: > > #include <iostream> > using namespace std; > #include "TString.h" > > int main() > { > TString W = "Hello World"; > cout<<W<<endl; > > return 0; > } > > On Linux, the output is of course: Hello, World! > But on Windows I get a Crash (access violation)!! > > Wenn I replace <iostream> with <Riostream.h> I also crashes on Windows. > There is no crash when I replace cout<<W<<endl; with cout<<W.Data()<<endl; > > Unfortunately I am no Windows expert, so I cannot debug ROOT on Windows, > but if I should guess, it might be a problem in ostream& <<operator of > TString?? > > I am using ROOT v4.00/02 win32gdk with Visual C++ 6.0 SP3 > > Ciao, > Andreas Zoglauer
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET