title: C - Setting a struct to null (incompatible types in assignment)
body: <p>I have the following struct:</p>
  
  <pre><code>struct elem {
    int number;
    char character;
  };
  
  struct item {
    struct elem element;
  };
  </code></pre>
  
  <p>and the following function:</p>
  
  <pre><code>void init(struct item *wrapper) {
    assert(wrapper != NULL);
    wrapper-&gt;element = NULL;
  }
  </code></pre>
  
  <p><code>item-&gt;element = NULL</code> yields a <code>incompatible types in assignment</code>. Why is that? Shouldn't setting a struct to NULL be okay?</p>