I have the following codes:
const int N=3;
static double * p[N];
Does p stands for a static pointer pointing to a N-dimensional double array, or a N-dimensional array with each elements standing for a static pointer?
Also I found the following change failed compilation, and not sure why…
int N=3;
static double * p[N];
Almost the second choice a N-sized array with each elements standing for a static pointer. Note the change from “N-dimensional” to “N-sized”. Thanks @David.
Arrays need constant integers for their size. After you remove the “constness” of
Nthe size ofpis uncertain at compile time.