Re: [ROOT] How to initialize TH1F* aPtr[]?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Feb 10 2004 - 13:53:59 MET


Replace the pointer declaration and allocation respectively by:

  TH1F** pH1FArr;
  pH1FArr = new TH1F*[n];

Rene Brun

Exaos Lee wrote:
> 
> Dear ROOTer,
> Please help me to check the attachments. I want to use an array of TH1F*
> in my code. But I am confused by how to initialize it. And it is not
> good to use something like "malloc", "calloc" in a C++ code.
> 
> Regards.
> 
> Exaos
> 
>   --------------------------------------------------------------------------------
>                       Name: ERootAnalysis.h
>    ERootAnalysis.h    Type: text/x-c-header
>                   Encoding: 7bit
> 
>                       Name: ERootAnalysis.C
>    ERootAnalysis.C    Type: text/x-c++
>                   Encoding: 7bit



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET