I am trying to pass a row of a multidimensional array to a function as pointer. The 3d arrays are stores inside the following structure.
typedef struct{
double complex CUR[MAX_CHANNELS][MAX_HARM][4];
double complex VOL[MAX_CHANNELS][MAX_HARM][4];
}VALS;
I am trying to pass one row into the following function as a parameter.
void foo(double complex *V,double complex *I);
In the main program I am passing the first row as a pointer. But in the execution I am getting an "incompatible pointer type warning".
foo(&VALS.VOL[2][0],&VALS.CUR[2][0]);
&. Arrays automatically decay to pointers when used as function arguments.