I have searched C++ forums and tried experimenting, but I cannot find any advice on using and returning arrays with pointers and libraries.
I have a Function called 'FunctionName' in the Libary 'LibName'. I want to run a main loop which has two arrays (Array1 and Array2) of sizes 16x17 and 17x16, which takes the arrays and sends them to the function. The function then processes the Arrays and returns its own array back to the main function:
In a .pde I am calling a Function using:
#include <LibName>
LibName libname
Var=libname.FunctionName(Array1 [16][17]. Array2[17][16];
where LibName.h:
public: int FunctionName(int Array1[16][17], int Array2[17][16])
and LibName.cpp:
int LibName::FunctionName(int Array1[16][17], intArray2[17][16])
int *ResultPointer = Result;
return *ResultPointer;