title: How to resolve "parameter has incomplete type" error?
body: <p>I'm a newbie and I need help with debugging my code.
  When I compile it 'type of formal parameter 1 is incomplete' and type of formal parameter 2 is incomplete' error appears in</p>
  
  <pre><code> printf("Age is %d years.\n", calc_age(birth, current));
  </code></pre>
  
  <p>while 'parameter 1 ('birth') has incomplete type' and ' parameter 2 ('current') has incomplete type' errors appear in</p>
  
  <pre><code>int calc_age (struct date birth, struct date current) {
  </code></pre>
  
  <p>Help is appreciated, thanks!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int calc_age (struct date birth, struct date current);
  
  
  int main(void)
  {
  
      struct date {
          int month[1];
          int day[1];
          int year[1];
  
  };
  
  
      struct date birth, current;
      char c;
  
      printf("Input the birthdate (MM/DD/YY): ");
      scanf("%d %c %d %c %d", birth.month, &amp;c, birth.day, &amp;c, birth.year);
      printf("Input date to calculate (MM/DD/YY): ");
      scanf("%d %c %d %c %d", current.month, &amp;c,  current.day, &amp;c, current.year);
  
      printf("Age is %d years.\n", calc_age(birth, current));
  
      return 0;
  
  }
  
  int calc_age (struct date birth, struct date current) {
  
      int age;
  
      if (birth.month[0] &lt; current.month[0]) {
          age = (current.year[0] - birth.year[0]);
      } else if (birth.month[0] &gt; current.month[0]) {
          age = (current.year[0] - birth.year[0] - 1);
      } else {
          if (birth.day[0] &lt;= current.day[0]) {
              age = (current.year[0] - birth.year[0]);
          } else {
              age = (current.year[0] - birth.year[0] - 1);
          }
      }
  
      return age;
  }
  </code></pre>