3 ms·
You can trade some safety for syntactic convenience by using pointers to the subarrays instead of a pointer to the multidimensional array, eg void do_with_
by cygx 10y ago
You can trade some safety for syntactic convenience by using pointers to the subarrays instead of a pointer to the multidimensional array, eg
void do_with_array(size_t m, size_t n, int a[static m][n]) { ... }
int (*a)[n] = calloc(m, sizeof *a);
do_with_array(m, n, a);