title: Passing in an element in an array as a pointer in a function in C
body: <pre><code>int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg);
  </code></pre>
  
  <p>I am trying to pass in an argument as a pointer through pthread_create.</p>
  
  <pre><code>typedef struct {
      int input;
      int threadNum;
  } ARGS;
  
  ARGS argument16[16];
  for (x = 0; x &lt; 16; x++) {
      printf("pthread16_created: %d\n", x);
      argument16[x].threadNum = 16;
      argument16[x].input = x % 4;
      pthread_create(&amp;(threads16[x]), NULL, funct, argument16[x]);
  }
  </code></pre>
  
  <p>This is giving me 
      error: incompatible type for argument 4 of ‘pthread_create’</p>
  
  <p>How do I pass in a ARG type pointer in a array of ARGS? I can't seem to figure it out. I know arrays are already a pointer, but not sure how to pointer to a certain element in the array.
  Thank you</p>