Hi everyone,
I'm having a hard time figuring out something and I'm hoping someone here can help.
When I picture an array, I see a group of cells. If it's a 1D array then it's simply a row. If it's a 2D array then it's a plane of cells. If it's a 3D array then it's a cube.
My problem starts at 4D arrays and moving onward from there. I just can't seem to comprehend how they work, and how one would look. Being able to picture this stuff is a big thing for me, because I can think about it better that way.
The only thing I understand for sure beyond 3D is that it still follows the basic rule of adding another dimension: You still multiply the size of each dimension to get the total number of cells in the array. So as I understand it, the following array
int myarray[1][2][3][4]
has 24 cells. I just don't know where the last 18 are or why I would ever need more than 3 dimensions.
Can anyone help?
Thanks, Nate
I'm having a hard time figuring out something and I'm hoping someone here can help.
When I picture an array, I see a group of cells. If it's a 1D array then it's simply a row. If it's a 2D array then it's a plane of cells. If it's a 3D array then it's a cube.
My problem starts at 4D arrays and moving onward from there. I just can't seem to comprehend how they work, and how one would look. Being able to picture this stuff is a big thing for me, because I can think about it better that way.
The only thing I understand for sure beyond 3D is that it still follows the basic rule of adding another dimension: You still multiply the size of each dimension to get the total number of cells in the array. So as I understand it, the following array
int myarray[1][2][3][4]
has 24 cells. I just don't know where the last 18 are or why I would ever need more than 3 dimensions.
Can anyone help?
Thanks, Nate