Board index » delphi » how to fetch pointer to a matrix(array of array)

how to fetch pointer to a matrix(array of array)

hi guys, i need your help, again.

i have a function named:
    double** matrix_identity(int n) {...};
that returns a pointer to an identtity matrix of size n by n.

and here is what i am trying to do:
    double** matrix_power(const double * const * matrix, int n, int m,
int k) {
        ...
        double** idty = matrix_identity(int n);
        return idty;
        ...
    }

when i try to compile, i get this error message:
    Error E2188 matrix.cpp 138: Expression syntax in function
matrix_power(const double * const *,int,int,int)

I know the assignent must be wrong, how is it wrong and what should i do
to fix it??

Thanks in advance,
Marty

 

Re:how to fetch pointer to a matrix(array of array)


Quote
Marty wrote:

>         double** idty = matrix_identity(int n);

Remove 'int' from the argument list.

Other Threads