So I would like to store a couple of matrices in an array. I understand you could make a three dimensional array. What I want to do is to be able to store the matrices I get from AndMatrix method in an array and then use them when I need to. My code is below. arrayOfMatrices variable is a 3 dimensional array I have initialized already. Can someone explain also how I would access these matrices in the array. My code is below:
int** AndMatrix(int **original,int **matA, int **matB, int row, int column){
int** result=calloc(row, sizeof(int*));
for (int i = 0; i < row; i++) {
result[i] = calloc(column, sizeof(int)); }
return result;}
char temps[10][rows][columns];
arrayOfMatrices[countForMatrices] = AndMatrix(matrix,matrix1, matrix2, rows,columns);