I try running this C++ code as a Windows console application, but when it starts up, it immediately closes, only giving me a standard "this program has stopped working" error that Windows usually gives me.
The main function of the program is (with a bit of extra code omitted after it):
int main() {
cout << "FIRST LINE";
int fract[501][501];
int rfract[501][501];
int nufract[501][501];
int nurfract[501][501];
int snufract[501][501];
int snurfract[501][501];
system("PAUSE");
return 0;
}
Interestingly enough, if I only have the first 2 arrays, the program runs fine, but if I have any of the other 4 arrays (even just one of them), the program crashes upon start. I am using a computer with 4 GB of RAM, and I haven't been getting any helpful error messages, although it seems like that's the problem. If I change the sizes of all of them to [101][101]
(goes from ~1.2 MB to ~50kB) the issue is solved, but I have less space to input functions into them. Is there a way to work around this?