+ 1
Multi dimensonal arrays
I couldn't understand 3 or more dimensonal arrays
3 Respostas
+ 2
The more dimensions an array has the more elements it can hold, of course.
arr[5]
This 1D array has 5 elements.
arr[5][10]
This 2D array has 50 elements (5 * 10)
arr[5][10][15]
This 3D array has 750 elements (5 * 10 * 15)
It's all a case of how many elements you need, and how many dimensions you need to work with (and are comfortable working with).
The more dimensions an array has just adds another axis of elements, further than X Y Z, which is why the number of elements can very quickly increase as you add more dimensions.
+ 2
You're welcome! Haha this was answered over a year ago😅
+ 1
thx for explaining