Re: [ROOT] TArrayD

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Sep 25 2003 - 19:31:28 MEST


What you do is illegal C++
You should do:
 TArrayD *a = new TArrayD(10);
 for(Int_t i=0;i<10;++i){
         (*a)[i] = i;

or

TArrayD a
 for(Int_t i=0;i<10;++i){
         a[i] = i;

Rene Brun


On Thu, 25 Sep 2003, [gb2312] Dong Zhou 
wrote:

> dear rooters:
>  
> my code is like this:
>  
> TArrayD *a = new TArrayD(10);
> for(Int_t i=0;i<10;++i){
>         a[i] = i;
> }
> 
> but it does not work properly, i cannot even run it.
>  
> zhou dong
> 
> 
> 
> ---------------------------------
> Do You Yahoo!?
> 启用电邮帐号,领会雅虎通[身临其境聊电影]的动感魅力,还有网络摄像头+雅虎通收音机等你来拿



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET