title: Trying to implement RBtree in C
body: <p>I tried to implement RB tree in C but the compiler always failed on specific error: "dereferencing pointer to incomplete type"</p>
  
  <p>I declared the following Struct:</p>
  
  <pre><code>`typedef struct costumer_tree  
  {
      int id;
      char lastName[100];
      int color;
      struct costumers_tree * left;
      struct costumers_tree * right;
      struct costumers_tree * parent;
  }
  costumerTree;`
  </code></pre>
  
  <p>And use the RBfix function:</p>
  
  <pre><code>`treeInsertFixup(costumerTree *costumerTreeRoot, costumerTree *z)
  {
  costumerTree *y;
  while (z-&gt;parent-&gt;color == 2)
  {
  ...}`
  </code></pre>
  
  <p>But when i compile the code the compile always failed on the row:
  <code>while (z-&gt;parent-&gt;color == 2)</code>
  With the error: "dereferencing pointer to incomplete type"</p>
  
  <p>Why am i missong?</p>
  
  <p>Thanks,</p>