title: C - "Argument type 'void' is incomplete" error using a function to print trees
body: <p>I'm trying to create a function which allows trees of different sizes to be printed when calling from the main function. Unfortunately when I run my code I get the error "Argument type 'void' is incomplete" three times in my main function. Here's my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void tree(int rows)
  {
  int i, j;
  
  for(i=1; i&lt;=rows; i++)
  {
      for(j=i; j&lt;rows; j++)
      {
          printf(" ");
      }
      for(j=1; j&lt;=(2*i-1); j++)
      {
          printf("*");
      }
      printf("\n");
      }
   }
  
  int main()
  {
      int rows;
      rows = 5;
      printf("%d\n", tree(rows));
      rows = 3;
      printf("%d\n", tree(rows));
      rows = 6;
      printf("%d\n", tree(rows));
  }
  </code></pre>
  
  <p>I would appreciate any advice!</p>