I want to make make an array of 10 Stacks, to be “filled” in a for loop:
...
TH1F *histo[10];
THStack compa[10];
...
c7->cd(j+1);
histo[j]->SetLineColor(kRed);
compa[j]->Add(sel);
compa[j]->Add(histo[j]);
compa[j]->Draw("nostack");
where histo[j] is filled during the same iteration, and sel is a previously defined histogram. The loop starts at j=0 and continues for j<10.
The Stack does not plot and I get the following warning message:
[quote]Warning: wrong member access operator ‘->’ HelicityAngle.C:245:
Warning: wrong member access operator ‘->’ HelicityAngle.C:246:
Warning: wrong member access operator ‘->’ HelicityAngle.C:247:
[/quote]
where the three lines in question refer to the last three lines of the code above.
What’s the problem? Is compa[j] an array of stacks?