[ROOT] Question about TCanvas

From: Datao Gong (dtgong@physics.umn.edu)
Date: Mon Sep 15 2003 - 16:30:55 MEST


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