I have 2 static matrices. a[][N] and b[][M]. Both N and M are pre defined and are not equal to each other. Now how am I supposed to write functions that can recieve them both and work properly?
void PrintStaticMatrix(int matrix[][??], int rows, int cols);
What am I going to need to put insted of ??. The naive way is to seperate the function into two functions; they will be exactly the same, but one is for N and the other one is for M. Howeve, it does not seem to make any sense. Is not there a better way? I would have much perferred to use only dynamic arrays, but we are forced to in an advanced C course.