hello so I don't understand where is my error, I want to print the contents of a 2D matrix line by line:
void print_matrix(char s[], double m[], size_t rows, size_t cols)
{
printf("%s =\n", s);
for (size_t i = 0; i < rows; i += 1)
{
for (size_t j = 0; j < cols; j += 1)
{
printf("%d ", m[i][j]);
}
printf("\n");
}
}
I want it to be like this :
m1 =
1 2 3 4
5 6 7 8
9 10 11 12
it gives me an error here: m[i][j] but nothing else. Thanks for helping I'm a beginner