You declared a pointer to double and allocated memory for one-dimensional array.
double *value = new double[numrows][numcols] ;
and get message that the expression must have constant value.
The compiler must know the size of the element of a two-dimensional array. That is in this statement numcols shall be a constant expression. Moreover the types of left and right sides of the expression in the statement do not coinside.
Usually the following method is used
1 2 3 4 5 6
double **value = newdouble *[numrows];
for ( int i = 0; i < numrows; i++ )
value[i] = newdouble[numcols];
1 - write a matrix class that swaps to disk the parts it won't be needing.
2 - write a matrix class entirely disk-based (sloooow).
3 - a matrix class that stores compressed information (harder).