If I create a file:
test.cpp:
void f(double **a) {
}
int main() {
double var[4][2];
f(var);
}
And then run: g++ test.cpp -o t
The problem is that a double** is a pointer to a pointer. Your 'f' function wants to be passed the address of a pointer to a double. If you call f(var), well, where exactly do you think that pointer is? It doesn't exist.
This will work:
double *tmp = (double *) var;
f (&tmp);
Also, it would work to change the definition of f:
void f (double a[4][2]) { }
Now f takes a pointer to the kind of array you have. That will work.