I have a program that multiplies matrices sequentially in C that I'm trying to finish up. I'm getting the error listed in the title.
Here is the line that is giving me the trouble:
C[i,j] = C[i,j] + A[i,k] * B[k,j];
A, B, and C are 2-dimensional arrays. They are defined with this code:
A = (double **) malloc(sizeof(double *)*n);
for (r = 0; r < n; r++) {
A[r] = (double *) malloc(sizeof(double)*n);
}
The definition of B and C are the same as this. n is an integer value which defines the size of the columns and rows.
I don't know why I'm getting this error. From some of the other questions I've looked at, this error comes up when the types for an operation are incorrect, but I don't understand why that's the case here. Does anyone have any ideas?