title: How to define a typedef struct containing pointers to itself?
body: <p>I am writing a LinkedList in C, the below code represent my Node definition.</p>
  
  <pre><code>typedef struct {
      int value;
      struct Node* next;
      struct Node* prev;
  } Node;
  </code></pre>
  
  <p>I understand (or think that I do) that <code>struct Node</code> not the same as <code>typedef struct Node</code>. Granted my code compiles and runs as it's supposed to, however, I get a lot of warnings when assigning <code>next</code> and <code>prev</code> (warning: assignment from incompatible pointer type). I am guessing that this has to do with how I'm defining them in the Node structure. 
  I uploaded the full source <a href="http://ken-soft.com/2010/10/21/linkedlist-c/" rel="noreferrer">here</a></p>
  
  <p>So, if that is indeed the problem, how should I define <code>next</code> and <code>prev</code> inside the <code>typedef struct Node</code>?</p>
  
  <p>I was worried this may be a repost, but couldn't quite find what I was looking for. Thanks.</p>