title: Incompatible Types Error with Struct C
body: <p>I am receiving an incompatible types error as follows:</p>
  
  <pre><code>error: incompatible types when assigning to type ‘struct cache *’ from type ‘cache’
  </code></pre>
  
  <p>I have the following structures.</p>
  
  <pre><code>typedef struct __region {
  int size;
  void *addr;
  struct __region *next;
  } region;
  
  typedef struct {
  int size;
  int remainingSpace;
  void *addr;
  char *bitmap;
  struct cache *parent;
  struct slab *next;
  } slab;
  
  typedef struct {
  int alloc_unit;
  int slab_counter;
  slab *S;
  } cache;
  
  typedef struct {
  region *R;
  cache C[8];
  } memory;
  </code></pre>
  
  <p>The code I run which receives the error is:</p>
  
  <pre><code>memory M;
  M.C[0].S-&gt;parent = M.C[0];
  </code></pre>