title: How to pass an array of structures to a function by reference in C?
body: <p>This code is similar to what I am attempting to do, however I am getting errors saying that I am passing incompatable types</p>
  
  <pre><code> #include &lt;stdio.h&gt;
  
  struct numbers{
      int num;
  };
  
  void fillArray(struct numbers* a[]);
  
  int main(void)
  {
      struct numbers array[4]; 
  
      fillArray(&amp;array);
  
      for(int i = 0; i &lt; 4; i++)
      {
          printf("%d", array[i].num);
      }
  
  }
  
  void fillArray(struct numbers* a[])
  {
      for(int i = 0; i &lt; 4; i++)
      {
          a[i]-&gt;num = i;
      }
  }
  </code></pre>