比如: float * 写成 float[],或IntPtr什么的
而类似下面这样该怎么接收呢,求高手指教,谢谢
extern "C" DLLTEST_API float** test(float** c){
int lenth = 3;
float** arr = new float *[lenth];
for (int i = 0; i < lenth; i++)
{
arr[i] = new float[lenth];
}
for (int r = 0; r < lenth; r++)
{
for (int c = 0; c < lenth; c++)
{
arr[r][c] = (float)( (lenth * r) + c + 1);
}
}
c = arr;
return c;
}
我试了这样写是错误的
[DllImport("DLLTEST")]
public static extern IntPtr[] test(ref float[] arrName);
意思说写成这样,是吗,试了的,不行,返回不了数据
public static extern IntPtr test(ref float arrName);