03-23-2013, 09:53 AM
Done for int/double:
Macro Macro205
C++
Any ideas on how to receive an array of int or str?
Macro Macro205
dll "myDLL" double'myfunc
ARRAY(double) arr.create(5)
arr[0]=1.0001
;...
double result=myfunc(&arr[0], arr.len)
out result
C++
extern "C" __declspec(dllexport) double myfunc(double *pointerElement0, int arrlen);
double myfunc(double *pointerElement0, int arrlen)
{
,double result=0;
,
,for (int i = 0; i < arrlen; i++)
,{
,,result+=pointerElement0[i]; // ;; example
,}
return result;
}
Any ideas on how to receive an array of int or str?