【发布时间】:2008-12-11 18:52:14
【问题描述】:
我正在尝试运行一个 3d 数组,但是当我运行它时代码在 windows 中崩溃了,这是我的代码;
#include <iostream>
using namespace std;
int main(){
int myArray[10][10][10];
for (int i = 0; i <= 9; ++i){
for (int t = 0; t <=9; ++t){
for (int x = 0; x <= 9; ++t){
myArray[i][t][x] = i+t+x;
}
}
}
for (int i = 0; i <= 9; ++i){
for (int t = 0; t <=9; ++t){
for (int x = 0; x <= 9; ++t){
cout << myArray[i][t][x] << endl;
}
}
}
system("pause");
}
谁能给我一个快速修复/解释
【问题讨论】: