Hi all,
I am writing a program where I use an 2D array:
...
Int_t N_ev=2608;
Int_t N_set=100;
Float_t poisson[N_set][N_ev];
for (int i=0; i<N_set; i++)
{
for (int j=0; j<N_ev; j++)
{
poisson[i][j]= TMath::Poisson(j,3.87);
mean[i] += (poisson[i][j])/(N_ev);
}
}
...
If the value of N_set is 100, it works, but if I put 1000, I obtain:
Error: Array index out of range poisson -> [260801] valid upto poisson[99][2607]
and I don’t understand where is the mistake.
I try to use TMatrix and it works, but I don’t understand how I get a element of the matrix.
Could you answer to these my two question, please?
Thanks
Ciccio