To pass a 2d array to a function with the array inline, I can do the following:
void print_arr2(int (*arr)[3], size_t size);
print_arr2((int[2][3]) {{1,2,3}, {3,6,9}}, 2);
print_arr2((int[][3]) {{1,2,3}, {3,6,9}}, 2);
However, the following notation doesn't seem to be supported or I am entering it in incorrectly:
print_arr2((int(*)[3]) {{1,2,3}, {3,6,9}}, 2); // pointer to int [3]
Is this last format not supported, or what's the reason that that fails in trying to use a compound literal for it?