Hi ,
   You should define "gr[4]" and "i",
that is to say you should add "TGraph gr[4];" and change 
"for(i=1;i<5;i++)" into "for(Int_t i=1;i<5;i++)" in your macro, then it'll 
gonna be ok.
uOn Thu, 16 Mar 2006, Zhu FengRong wrote:
> Hello,
>    In the root_v4.01.02.Linux.RH7.3.gcc296 environment,I failed to run the 
> macro like this:
>    
>       {
>         Float_t a[4]={450,1050,1431,1983};
>        Float_t  b[4][4]= 
> {1576,3420,4854,6635,117,262,402,528,21,53,71,93,4,18,24,28};
>  TCanvas *c1=new TCanvas("c1","",1);
>  c1->Divide(2,2);
>  for(i=1;i<5;i++)
>   {
>   c1->cd(i);
>   gr[i-1]=new TGraph(4,a,b[i-1]);
>   gr[i-1]->Draw("AL*");
> 
>   }
>       }  
>  Would you help me to succeed in running it?
>  Thank you in advance.
>   
> with best wishes, 
> Fengrong Zhu 
> Institute of High Energy Physics, 
> C.A.S P.R.C 
> zhufr_at_ihep.ac.cn  
> --  
> Open WebMail Project (http://openwebmail.org)
> 
-- ************************************************ * Hengtong Ding * * * * Address: Institute of Particle Physics, * * Central China Normal University * * Wuhan, 430079, P. R. China * * Tel: 0086 27 6786 7946 (lab) * * 0086 27 8715 0351 (dormitory) * * Fax: 0086 27 6786 3213 * * Email: dinght_at_iopp.ccnu.edu.cn * * dinghengtong_at_hotmail.com * ************************************************Received on Thu Mar 16 2006 - 04:30:26 MET
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET