Using loop to declare matrices

I have an assignment to create a program that reads in multiple matrices from a file and then performs requested operations, which are also on the file.

I wanted to use a for loop to declare these matrices so that I would get matrix1, matrix2, matrix3, etc. However, I can't figure out how to do that. I tried using:

for(int i = 1; i <= numberOfMatrices; i++){
float matrix_i[25][25];
}

I also thought about using matrix[i][25][25] but that would only add another dimension and wouldn't be part of the name. I'm completely lost as how to go about doing this.
matrix_i will be local to the loop body
You can create them dynamically ( as a 3D array, which wouldn't be a 3D matrix but an array of 25x25 matrices ) or use some standard container ( which would be a nicer way to do the same thing )
I think the 3D array method will work best. It should actually also make it easier to perform the operations than what I originally had in mind.

Thanks.
Topic archived. No new replies allowed.