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



LinkBack URL
About LinkBacks


