Re: [ROOT] TString

From: Mr. Lijun QIN (qin@comp.tamu.edu)
Date: Fri Jun 20 2003 - 16:52:16 MEST


 Hello ! 
Federico , I test your code on my PC . (RH7.2&&gcc2.96&&root.3.03.09). 
I changed  
 Char_t WS_name="xxx";
 To : Char_t * WS_name="xxx";
testFederico()
{
 List *name_list=new TList();
 Char_t * WS_name="xxx";
 name_list->Add(new TObjString(WS_name));
TString tst(((TObjString*)name_list->At(0))->GetString());
cout<<tst.Data()<<endl; // newly added 
}
.x testFederico.C 
you see it is working and output is : xxx
 cheers , 
 Lijun QIN 


On Friday 20 June 2003 04:17 am, you wrote:
> Hello,
>
> I'm using Version 3.03/09 on RH7.2.
> In a simple code I execute with .x I do:
>
> TList *name_list=new TList();
> Char_t WS_name="xxx";
> name_list->Add(new TObjString(WS_name));
> TString tst(((TObjString*)name_list->At(0))->GetString());
>
> and at this point I get:
>
> 	Error: ~TString() header declared but not defined
>
> What is wrong?
>
> Thanks a lot,
> Federico

-- 
*****************************************************************************************
 Mr.Lijun QIN -----Ph.D Student in Experimental Nuclear Physics    
 WWW:  http://Lijun.physics.tamu.edu                            
 E-mail:  qin@comp.tamu.edu
   Mail : Cyclotron Institute Texas A&M University                     
         College Station Texas  77843 USA                               
 Phone : 979-845-1411 Ext.266 (office) 979-862-9440 (Home-Hensel Dr. Apt 
.U1G)   
******************************************************************************************** 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET