Very specific problem, possibly due to my generally poor understanding of multidimensional arrays in C. I've got this code:
int io_pipes[NUM_IO_PROC][n][2][2];
for (int i = 0; i < n; ++i) {
int pipes[NUM_IO_PROC][2][2];
for (int j = 0; j < NUM_IO_PROC; ++j) pipes[j] = io_pipes[j][i];
}
There's some stuff missing, of course (like what happens to the pipes variable). Problem is that on line 5 there, I get a compiler error that say "incompatible type in assignment." I'd like it if the compiler gave me more information because as far as I know, pipes[j] and io_pipes[j][i] are both of type int[2][2].
pipes[j]andio_pipes[j][i]are both of typeconst int[2][2], which means you cannot assign topipes[j].