title: How to fix "type of formal parameter 1 is incomplete" in C
body: <p>Here's my code. I'm getting error:</p>
  
  <blockquote>
    <p>type of formal parameter 1 is incomplete </p>
  </blockquote>
  
  <p>at the line where function minCost is called inside <code>main()</code>. Please help!</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;limits.h&gt;
  
  int minCost(int cost[][], int m, int n)
  {
  if (n &lt; 0 || m &lt; 0)
     return INT_MAX;
  else if (m == 0 &amp;&amp; n == 0)
    return cost[m][n];
  else
    return cost[m][n] + min(minCost(cost, m-1, n),minCost(cost, m, n-1) );
  }
  
  int min(int y, int z)
  {
     if (y &lt; z)
        return y;
     else
        return z;
  }
  
  int main()
  {
      int test_case,m,n,pos_m,pos_n;
      int cost[20][20];
      scanf("%d",test_case);
      scanf("%d%d",m,n);
      scanf("%d%d",pos_m,pos_n);
  
      for(int i=0;i&lt;m;i++)
          for(int j=0;j&lt;n;j++)
              scanf("%d",cost[i][j]);
      printf("%d",minCost(cost, pos_m, pos_n));
      return 0;
  }
  </code></pre>