I need to get access to 2 dimensional array that referenced from pointer to struct but I cannot see the values stored in this array. I used method thta was proposed here to get access via pointer to 2D Array ( as described here Create a pointer to two-dimensional array ) the structure encapsulated in shred memory erea between 2 processes. the struct contains 2D array of floats. altoght there are values stored in the first array of the 2D array , the value read in function foo is 0 . is this is the right access mode ? is the difference is due to the fact that the access is via double pointer mechanism ? ( using the Arrow notation )
typedef struct
{
float32 Position[3];
float32 MODE[4];
float32 GeneralInfo;
float32 COLOR [8][3];
} tsInputData;
typedef float32 array_of_3_float32[3];
array_of_3_float32 *p_Color;
float32* p_Position;
float32* p_Mode;
float32* p_GeneralInfo;
void Init_Host(void* InData)
{
pData = (tsInputData*)InData;
p_Position = pData->Position;
p_Mode = pData->MODE;
p_GeneralInfo = &(pData->GeneralInfo);
p_Color = pData->COLOR;
}
int foo()
{
float32 var = p_Color[0][0];
}