I have a function in C that one of its arguments is 3D array. when I'm debugging its seems the VS see it as a 2D array, why is it?
this is a program that helps to order goods in containers (boxes). this specific function is called when its known the this spot is ok to put' and it put it on the 3D matrix.the code:
void put_box(unsigned char space[241][47][48], int x, int y, int z, BOX box, int box_number) {
int i, j, k;
int top_stop;
//cheking if to mark all the hight
if (box.top)
top_stop = 48;
else
top_stop = box.height / 5;
// mark the box
for (i = x; i < x + (box.length / 5); i++)
for (j = y; j < y + (box.width / 5); j++)
for (k = z; k < top_stop; k++)
space[i][j][k] = (unsigned char)box_number;
}/*void put_box*/
I expect to see on the locals window the 3D array but I see only 2. and its effect the writing to the matrix.