title: C - Dereferencing pointer to incomplete type
body: <p>I have read about 5 different questions on the same error, but I still can't find what's the problem with my code.</p>
  
  <p>main.c</p>
  
  <pre><code>int main(int argc, char** argv) {
      //graph_t * g = graph_create(128); //I commented this line out to make sure graph_create was not causing this.
      graph_t * g;
      g-&gt;cap; //This line gives that error.
      return 1;
  }
  </code></pre>
  
  <p>.c</p>
  
  <pre><code>struct graph {
      int cap;
      int size;
  };
  </code></pre>
  
  <p>.h</p>
  
  <pre><code>typedef struct graph graph_t;
  </code></pre>
  
  <p>Thanks!</p>