二维数组
int m = 3, n = 2;
int** arr;
//动态创建二维数组[3][2]
arr = new int*[m];//这里是m
for (int i = 0; i < m; i++) {
arr[i] = new int[n];//这里是n
}
三维数组
int x = 3, y = 4, z = 5;//arr[3][4][5]
int*** arr;
arr = new int**[x];
for(int i = 0; i < x; i++) {
arr[x] = new int*[y];
for(int j = 0; j < y; j++) {
arr[x][y] = new int[z];
}
}
标签:arr,int,C++,++,二维,数组,多维,new,指针 From: https://blog.51cto.com/u_15976424/9014703