I've got an array in my program defined using :
and I add data to it using:
Now this was working fine until a few hours ago when I started making some changes to a completely seperate part of the program (it was to do with making other arrays smaller), like a say, this was completely seperate functions, arrays, variables etc. I've checked and double checked that I havn't accidentally altered any code related to the above.
Now when I run the code I get the error:
After a little Googling it's related to a reading/writing from/to a NULL location.
Where has this error come from? I havn't changed anything!!!
Any ideas?
Thanks
Code:
distanceHoriz = (double*)malloc((count*heightSize) * sizeof(double));
and I add data to it using:
Code:
distanceHoriz[(j*WIDTH+i)] = temp;
Now this was working fine until a few hours ago when I started making some changes to a completely seperate part of the program (it was to do with making other arrays smaller), like a say, this was completely seperate functions, arrays, variables etc. I've checked and double checked that I havn't accidentally altered any code related to the above.
Now when I run the code I get the error:
Code:
Unhandled exception at 0x00414355 in Heightmap.exe: 0xC0000005:
Access violation writing location 0x00000000.
After a little Googling it's related to a reading/writing from/to a NULL location.
Where has this error come from? I havn't changed anything!!!

Any ideas?
Thanks