I have two structures like this:
And a function which works on a struct matrix; it's prototype is:
double * E;
struct Matrix * pMx;
This function works well if given a pointer to a Matrix structure.
double MxGetElement(struct Matrix * p, int iR, int iC)
I would like to call it through a "Model" pointer, let's call it "pModel".
etc etc and cannot make it work. Probably simple for you guys. I hope you can help me.
x=MxGetElement((struct Matrix *) pModel->pMx, iR, iC);
x=MxGetElement(&(pModel->pMx), iR, iC);