Kevin, What I have been doing is following { gROOT->Reset(); TObjString *Avars[23] = { "Total", "Debrems", "Dedelta", "Deelse", "Deepair", "Demunu", "Demuon", "Costhmu", "Deelse", "Ener", "Gmtns", "Gmtsec", "Id", "Ievent", "Nch", "Nhits", "Nstr", "Ntr", "Phimu", "Toff","Trigg", "Vmu", "Zmu" }; // TString temp = Avars[0].GetString(); // cout << temp.Data() << endl; Char_t temp[16]; Int_t ii = 0; sprintf(temp, "%s", Avar[ii]); cout << temp << endl; } Michal Lijowski > From owner-roottalk@pcroot.cern.ch Mon Aug 07 17:26:12 2000 > Delivered-To: lijowski@cosray2.wustl.edu > X-Authentication-Warning: pcroot.cern.ch: majordomo set sender to owner-roottalk@root.cern.ch using -f > Date: Mon, 7 Aug 2000 11:31:43 -0500 (CDT) > From: "Kevin M. Rhodes" <kmr@alizarin.physics.wisc.edu> > To: ROOTTALK <roottalk@pcroot.cern.ch> > Subject: [ROOT] TObjString confusion > MIME-Version: 1.0 > > Any explanations why this won't work: > > { > gROOT->Reset(); > TObjString *Avars[23] = { "Total", "Debrems", "Dedelta", "Deelse", > "Deepair", "Demunu", "Demuon", "Costhmu", > "Deelse", "Ener", "Gmtns", "Gmtsec", "Id", > "Ievent", "Nch", "Nhits", "Nstr", "Ntr", > "Phimu", "Toff","Trigg", "Vmu", "Zmu" }; > > TString temp = Avars[0].GetString(); > cout << temp.Data() << endl; > } > > I just need to use these variable names for passing to other functions, > and all I've accomplished is getting their memory adresses to print. > Thanks in advance for any help. > > Kevin Rhodes > UW-Madison > Amanda Project > > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET