Is it possible in C to pass a 2d array without eather of the sizes known? Something like this maybe:
#include <stdio.h>
void somefunction(int *array);
int main(void) {
int array[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
somefunction(array);
return 0;
}
void somefunction(int *array) {
printf("%d\n", array[3][2]);
}
I've also tried changing int *array to int *array[] (since 1 argument can be variable length) and int **array (worth a try). Any idea's? Thanks.