Please send a short test reproducing this problem see: http://root.cern.ch/root/roottalk/RoottalkRules.html Rene Brun Datao Gong wrote: > > Hi, > I create a TCavans object in a class constructor, but the pointer is not > avaible for other member function of the class. > > For example, i define a class cc and a pointer TCavas *c1 is a private > data member of the class. In the constructor of the class, c1 is assigned > a new TCanvas object, i set title and size of the TCanvas here. > But in the member function , c1 variable is not avalaible. > > In the macro scripts, i just run like that: > cc t; //c1 is a data member of cc, > t.callsomefunction(); //c1 is used in the member function. > > CInt complain like that: > Error: illegal pointer to class object c1 0x0 359 FILE:cc.C LINE:88 > *** Interpreter error recovered *** > ... > > Thanks > > Gong Datao
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET