I am a novice in C++ and I am trying to create a simple static 3 Dimensional Array and then print it out in console.
Here is my current code:
#include &l
Your syntax is wrong.
int a[2][2][3] = { // Initialize entire variable
{ // 1 of 2 (leftmost array)
{ 1, 2, 3 }, // 1 of 2 (inner array)
{ 4, 5, 6 }, // 2 of 2 (inner array)
},
{ // 2 of 2 (leftmost array)
{ 7, 8, 9 }, // 1 of 2 (inner array)
{ 10, 11, 12 }, // 2 of 2 (inner array)
},
}
What you've shown would be an int [8][2]
.