Problem with pointer to a pointer variable
I am using a program called HPGCC which converts C files into HP files for the HP programming calculator. However, I think my problem has to do with C programming, not HP.
I have the following main:
"sat_push_double_matrix" is a function to push a matrix to the stack of the HP calculator. Its format is:
I'm not interested in the BOOL output and I am not familiar with pointer to pointer variables, which is my problem. If I leave it like this I get the following warning in my compiler:
BOOL sat_push_double_matrix(int rows,int columns,double **array)
warning: passing argument 3 of 'sat_push_double_matrix' from incompatible pointer type
On my HP calculator it does give back a 2x2 matrix, but its content is not what i expected, which should be [[1,2],[3,4]] as i wrote in the main.
So my question is what should I do in the main function in order to avoid this variable format incompatibility so the expected matrix gets pushed into the stack? I would be very grateful if you could post me a solution to this problem.