title: C feeding array to function
body: <p>I am new to C, been doing java for a while and i cant figure this out
  I have an array declared like this </p>
  
  <pre><code>int tabela[visina][sirina];
  </code></pre>
  
  <p>What im trying to do is feed it to a function that looks like this:</p>
  
  <pre><code>int flood(int i, int j, int trenutna, int zamenjat, int **tabela) {
      tabela[i][j]=zamenjat;
      if (tabela[i+1][j]==0) {
          flood(i+1,j,trenutna,zamenjat,tabela);
      } if (tabela[i-1][j]==0) {
          flood(i-1,j,trenutna,zamenjat,tabela);
      } if (tabela[i][j+1]==0) {
          flood(i,j+1,trenutna,zamenjat,tabela);
      } if (tabela[i][j-1]==0) {
          flood(i,j+1,trenutna,zamenjat,tabela);
      } else {
          return 0;
      }
  }
  </code></pre>
  
  <p>I also call this in an if statement like this</p>
  
  <pre><code>if ((flood(i,j,trenutna,zamenjat,tabela)==0) {
      zamenjat++;
  }
  </code></pre>
  
  <p>What i get is a bunch of warnings that i have no idea how to solve: </p>
  
  <pre><code>passing argument 5 of ‘flood’ from incompatible pointer type 
  if ((flood(i,j,trenutna,zamenjat,tabela)==0) {
  //if i delete the ( that is too much in here i get a segmentation fault
  
  expected ‘int **’ but argument is of type ‘int (*)[(sizetype)(sirina)]’
  </code></pre>