Board index » cppbuilder » Function call.
Digby Millikan
![]() CBuilder Developer |
Function call.2008-04-07 12:06:18 PM cppbuilder67 Hello, I have a function call which will not compile. The problem arises, out of calling a function with two dimensional matrixs as parameters. The code looks like this; the .h file; void __fastcall Linear(TObject *Sender, double *a, int n, double *x, int er); the .cpp file; int msize, er; double gam[102][103], aw[102]; (1711) Linear(Sender, gam, msize + 1, aw, er); the function; void __fastcall TSMODForm::Linear(TObject *Sender, double *a, int n, double *x, int er) { double a[102][103], x[102]; int n, er; } The compile error; [C++ Error] GeosMOD.cpp(1711): E2034 Cannot convert 'double ( *)[103]' to 'double *' [C++ Error] GeosMOD.cpp(1711): E2342 Type mismatch in parameter 'a' (wanted 'double *', got 'double ( *)[103]') How do I pass a two dimensional matrix in a function call? |