Hi,
Sorry for naive question, but I can’t get what I’m doing wrong. I have an array of of pointers to the histograms, which I want to pass to the function as argument. And get a crash all the time.
Code:
TH1F *histo[10];
//initialization
for (int i=0;i<10;i++)
{
histo[i]=new TH1F(Form(“par%i”,i),Form(“par%i”,i),250,0,250);
}
fn(histo);
void fn(TH1F* histo[])
{
histo[3]->SetBinContent(10,10);//here it crashes
}
Thank you for any hint!