so about ~2500 of them. I would like to perform the same operation with all of them, but I don't want to write 2500 lines of code. Is there any way to refer to them in a loop? Something like
are you telling us, that you have defined separate ~2500 objects? Just declare an array of objects, like this:
1 2 3 4 5 6 7 8
//class A with Operation() method
A objectArray[x][y]; // x,y constanst or make it dynamically
//...
for(int i = 0; i < x ; i++)
for(int j = 0; j < y; j++)
objectArray[i][j].Operation();
Yeah, the problem is that I read all these objects from a ROOT file (ROOT is a program used in particle physics), so I don't create the objects, they are given to me in the format I wrote.