I have the following code
#include <stdio.h>
//#define arraySize 5
#define arraySize 500
void func(double B[arraySize][arraySize])
{
B[0][0] = 5;
}
int main(void) {
double Ar2D[arraySize][arraySize];
func(Ar2D);
printf("%f", Ar2D[0][0]);
}
Code works fine when I test it in a linux virtual machine, but when I run it in minGW, it crashes if I set arraySize to 500 (works fine in minGW if I set arraySize to 5). What is the best way to fix this?