Originally Posted by
Salem
> static const int rowNum = 2160;
> static const int colNum = 4320;
> double AVERAGE_LAT_DIST;
> short array[rowNum][colNum];
Did you do the maths to find out how big this array really is?
I did - it's 18,662,400 bytes, if a short is 2 bytes on your machine.
> EarthCalc trialone(5);
This tries to create that massive array on the program stack.
Given that on most operating systems, the default stack size is between 1MB and 8MB, you're blowing that away with the very first thing you do.
Make your EarthCalc constructor allocate this array dynamically.