I am writing a program where it is necessary to compute the entries of a n x n matrix with
n=1000.
If I write the following two lines in my code, I will get a stackoverflow error message:
const int n = 1000;
double matrix[n][n];
Error message:
Exception error at 0x010E1ED9 in Cubic spline.exe: 0xC00000FD: Stack overflow (Parameter: 0x00000000, 0x00292000)
How can I increase the stack size or do you think there is another way to solve the problem?
Visual Studio uses 4KB for the stack but reserved 1MB by default. You can change this in "Configuration Properties"->Linker->System->"Stack Reserve Size" to 10MB for example.
User contributions licensed under CC BY-SA 3.0