I have an integer array, of which, I know the first 4 bytes are a float the secon 4 bytes are another float and so on; to extract float numbers I use a float pointer like this:
uint8_t l_buffer[17];
float32 num1 = *(float*)&(l_buffer);
float32 num2 = *(float*)&(l_buffer[4]);
and all works perfectly, but I don't understand why!!!! In fact I tried to use the pointers without the '*':
float32 num1 = (float*)&(l_buffer);
float32 num2 = (float*)&(l_buffer[4]);
but it doesn't work. Sorry, but (float*)&(l_buffer) is not a cast to a floating pointer to the first location of l_buffer array ? Why I need to add the '*' ?