compilation error: request member in something not a structure of union

Posted by Fantastic Fourier on Stack Overflow See other posts from Stack Overflow or by Fantastic Fourier
Published on 2010-04-07T00:52:20Z Indexed on 2010/04/07 0:53 UTC
Read the original article Hit count: 301

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about c

    Related posts about pointers