Hello I'm fairly new to programming. I took an intro to Java class and I'm taking c++.
My question is, in a 3D array:
int myArr[a][b][c];
which is the one that defines the layers? a or c?
a would be the variable defining the number of "layers", if you mean each "layer" is a 2d grid of b x c elements.
When declaring and using a multi-dimensional array, it's up to you to determine which each level of the array means.
int myArray[6][3][9]
Given this array, just remember that the first index (closest to the variable name) has indicies 0-5, the middle index has indicies 0-2, and the last index has indicies 0-8. As long as you are in bounds for each, you will be fine.
myArris an array ofaarrays ofbarrays ofcints.