compilation error: request member in something not a structure of union
- by Fantastic Fourier
Hi everybody, I'm having the above error request member rv in something not a structure of union. I've googled it and several answers told me it's when working with a pointer but tries to access it as a struct, where I should be using -> instead of .
int foo(void * arg, struct message * msg)
{
struct fd_info * info = (struct something *) arg;
int * socks[MAX_CONNECTION];
socks = &(info->_socks); // where int * _socks[MAX_CONNECTION] in struct info
// do other things
rv = sendto(socks[i], &msg, sizeof(&msg), NULL, &(csys->client_address), sizeof(csys->client_address));
...
}
The problem is all of the arguments i have are pointers. i'm confused as to what is wrong. thanks to any comments/thoughts.