Hi, I do not understand if what you try to do is: - an array of TGraphErrors - or one single TGraphErrors build with an array of points and associated errors. Please clarify by sending a complete running script. Rene Brun On Thu, 10 Oct 2002, Avdhesh Chandra wrote: > > Hi, > I am trying to make graph array, so i can use it. > > programe looks like(where i am defining graph array) > > for(int i = 0 ; i < nent ; i++) > { > cout << " Col[i] " << Col[i] << endl; > gr[i] = new TGraphErrors(n,Z,Ent[i],Ez,Eent[i]); > gr[i]->SetMarkerColor(Col[i]); > gr[i]->SetMarkerStyle(Sty[i]); > } > > when i am running my code i am getting following message > > --------------------------------------------------- > Col[i] 7 > Col[i] 6 > Error: Array index out of range gr -> [1] valid upto gr FILE:test.C > LINE:156 > > *** Break *** segmentation violation > --------------------------------------------------- > > > Which shows that when it goes secound time in the loop it having problem. > Please let me know what i am doing worng. > > Thanks for any help > Avdhesh >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET