Hi all.
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:
Code:
int main(void){
double m[2][2];
m[0][0]=1;
m[0][1]=2;
m[1][0]=3;
m[1][1]=4;
sat_push_double_matrix(2,2,m);
return 0;
}
"sat_push_double_matrix" is a function to push a matrix to the stack of the HP calculator. Its format is:
Code:
BOOL sat_push_double_matrix(int rows,int columns,double **array)
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:
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.
Regards,
Rodri