I'm trying to run the following code in C++, to print numbers in each iteration, but it returns exit value: -1.073.xx
When the n
is less than 720 it works.
int main() {
int n = 820;
double xy[n][n];
double k = 0;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; j++) {
xy[i][j] = k;
k++;
cout << xy[i][j] << endl;
}
}
return 0;
}