+ 2

Arrays like a cube... Possible or not?

what do you think about this? int sample[x][y][z]= { {x, x, x}, {y, y, y}, {z, z, z} };

9th Apr 2018, 9:20 AM
Anatoly Kulikov
2 odpowiedzi
+ 4
Yes it' possible
9th Apr 2018, 9:28 AM
Manuchehrkhon
Manuchehrkhon - avatar
0
Actually, the example array you made is still only a 2D array. A 3D would be like this: int sample[1][2][2] = { {{z, z}, {z, z}}, {{z, z}, {z, z}} }; This is still possible.
9th Apr 2018, 2:03 PM
Zeke Williams
Zeke Williams - avatar