Dynamic allocation of arrays

Sean Kelly (kelly@physics.ucla.edu)
Mon, 22 Jun 1998 23:03:29 -0700 (PDT)



Hi Rooters,

when attempting to dynamically allocate an array of histograms

eg.

Int_t nHisto = 3;
TH1F xCov[] = new TH1F[nHisto];

Root exits with the following error message,

root [7] .L foo.C
root [8] main()
Run-time error, libC:
'delete[]' does not correspond to any 'new[]'

any suggestions are appreciated

Sean Kelly