I have a unsigned char pointer which contains a structure.Now I want to do the following
unsigned char *buffer ;
//code to fill the buffer with the relavent information.
int len = ntohs((record_t*)buffer->len);
where record_t structure contains a field called len.I am not able to do so and am getting the error.
error: request for member ‘len’ in something not a structure or union.
what am I doing wrong here?