On Mon, 20 Mar 2000, Patrick Dupre LCMI wrote: >Hello, > >Why I cannot do this: > char [16] tmp = "toto" ; > TGListBox *fDispSize = new TGListBox (fDisplay, -1) ; > TGTextLBEntry *fNbpt = new TGTextLBEntry (fDisplay, tmp) ; > >The last line gives a compilation error: >r/local/root/include/TGListBox.h:114: candidates are: TGTextLBEntry::TGTextLBEntry(const TGTextLBEntry &) > >/usr/local/root/include/TGListBox.h:104: TGTextLBEntry::TGTextLBEntry(const TGWindow *, TGString *, Int_t, GContext_t, FontStruct_t, UInt_t, ULong_t) > > >Thank for helping a novice. > Hi Patrick, "tmp" is not a TGString object - replace arg #2 in TGTextLBEntry: tmp -> new TGString(tmp), then it will work. Rudi -- __ __ __ | Rudi Lutter ____ / /_ __/ /_/ /____ ____ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / __/ / / // / __/ __/ -_) __/ | Email: Rudi.Lutter@Physik.Uni-Muenchen.DE /_/ /_/\_,_/\__/\__/\__/_/ | Tel: (089) 289 1 4287 | Fax: (089) 289 1 4280 --------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:21 MET