title: C -- Trouble with pointers
body: <p>I am new to C, know some Java.
  Trying to write a program that accepts 2D array that represents a directed adjacency matrix, and two numbers, scans the array and returns true if there is a directed path between them (top-down).</p>
  
  <p>I am running into a problem with C implementation. Apparently I have to use pointers to values in array, whilst in Java I could've use values from array (compare, return to function, etc). </p>
  
  <p>I'm pretty sure the logic is in place, I just need help with allocating '*'s in the right places and amounts.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #define N 12
  
  typedef int bool;
  enum {false, true};
  
  typedef struct adj_mat{
      int A [N][N];
  }adj_mat;
  
  
  
  int path(struct adj_mat A, int origin, int dest){
      int i;
      if (origin == dest) return true;
      for (i = 0; i &lt; sizeof(A);i++){
          if (A[origin][i]){
              return path (A, i, dest);
          }
      }
      return false;
  }
  </code></pre>
  
  <p>Thanks in advance.</p>