For a runtime calculated dimension of size NX the following syntax is correct.
But what I also want is a runtime dimensioned array of pointers to these guys but I can not find the proper syntax. Something akin to the following (which is wrong).
What is the correct syntax?
Code:
double (*var)[2] = new double[NX][2];
Code:
double *(*var)[2] = new double*[NX][2];
for(i=0; i<NX; ++i)
{
var[i] = new double[NY][2]; // NY != NX
}
Comment