It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center。
6年前关闭。
我知道2维的外观:
但是看起来如何:
我无法想象。
等等
6年前关闭。
我知道2维的外观:
int myArray[][4] = {
{ 1, 2, 3, 4 },
{ 1, 2, 3 }
};
int myArray[2][4] = { 1,2,3,4, 5,6,7,8 };
// So I've got now 2 arrays with 4 elements max.
但是看起来如何:
int myArray[][4][5][6];
int myArrayOther[][4][5][6][7]; // or it
我无法想象。
最佳答案
继续嵌套:
int array[4][3][2] = {
{ { 1, 2 }, { 3, 4 }, { 5, 6 } },
{ { 7, 8 }, { 9, 10 }, { 11, 12 } },
{ { 13, 14 }, { 15, 16 }, { 17, 18 } },
{ { 19, 20 }, { 21, 22 }, { 23, 24 } }
};
等等
关于c++ - 二维数组在超过2个维度时的外观如何? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16440792/
10-12 17:29