Hi,
I re-indented your function to make my point more clear:
On Sat, Jul 31, 2004 at 02:18:45PM -0500, Stilianos Kesisoglou wrote:
> void Performance()
> {
> if ((TCanvas*)gROOT->GetListOfCanvases()->FindObject("c1")){
> c1->Clear(); /* <--- HERE c1 is not declared! */
> } else {
> TCanvas *c1 = new TCanvas();
> }
> }
You proably want to do something like this:
{
TCanvas *c1 = gROOT->GetListOfCanvases()->FindObject("c1");
if(c1)
c1->Clear();
else
c1 = new TCanvas();
(...)
}
Chris
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning.
-- Rich Cook
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET