I'm trying to make an one-dimension array with 89401 elements in C:
double **A = (double**)malloc(89401*sizeof(double*));
for (i = 0; i<89401; i++)
A[i] = (double*)malloc(89401*sizeof(double));
But I keep getting this error:
Exception thrown at 0x003F61E0 in final project 2.exe: 0xC0000005: Access violation writing location 0x00000000.
I can't figure out what's the problem. I searched the site for previously asked questions but none of them contributed to me.
If there is a handler for this exception, the program may be safely continued.