What is the difference between a double ** and a double (*)[2].
If I understand well, a double ** is a pointer to a pointer of double, so it could be a 2D array of any size whereas double (*)[2] is a pointer to an array of double[2].
So if it is right, how can it be passed successfully to a function.
For instance in :
void pcmTocomplex(short *data, double *outm[2])
if I pass a double (*)[2] as a parameter, I have the following warning :
warning: passing argument 2 of ‘pcmTocomplex’ from incompatible pointer type
note: expected ‘double **’ but argument is of type ‘double (*)[2]’
What is the right way to pass a double (*)[2] to a function ?
EDIT : calling code
fftw_complex *in; /* typedef on double[2] */
in = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * 1024);
pcmTocomplex(data, in);