I have written a C++ application and within it, I need to call a math function that was written in C. The prototype looks like:
void Jacobi_Cyclic_Method(double *eigenvalues, double *eigenvectors, double *A, int n);
My problem is that I can't seem to pass the function double * (for instance both eigenvectors and A are multi-dimensional arrays. The C++ way to pass those things seems to be
double [][size]
I have read about extern C but I don't think it applies here since I am not interfacing with an object but with source itself. How can I send that C function my multi-dimensional arrays defined as such:
double [100][100] A;
double [100][100] eigenvectors;
double [100] eigenvalues;
Trying to compile I get:
error: no matching function for call to ‘MathEngine::Jacobi_Cyclic_Method(double
[100], double [100][100], double [100][100], int)’
mathEngine.h:9: note: candidates are: static void
MathEngine::Jacobi_Cyclic_Method(double*, double*, double*, int)