Hi Everybody,
I am having trouble with a fairly simple problem, I am sure.
I have a structure that contains 2D arrays:
struct S {
float array[4][4];
.....
snip
.....
} *ptr;
and a function: int Trans(float data_array) {
int i, j, jj;
float array[16];
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
array[jj] = data_array[i][j];
}
}
return 1;
}
I want to pass the array to the function like this:
res = Trans(ptr->array);
For brevity, I have not included any error checking in the call.
This way gives me a pointer type error and I don't want to send the
entire structure to the function.
Does anyone how to quickly do this?
Appreciate your help.
/S