title: Self-Referencing C Struct
body: <p>Can you have a structure in C that has elements of that same structure? My first attempt at implementing a binary search tree in C is the following:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  struct binary_tree_node {
  
      int value;
      struct binary_tree_node *left = null;
      struct binary_tree_node *right = null;
  
  };
  
  main() {
  
      struct binary_tree_node t;
      t.value = 12;
  
      struct binary_tree_node y;
      y.value = 44;
      t.left = &amp;y;
  }
  </code></pre>
  
  <p>I can't figure out what's wrong with this code, any help would be appreciated. I realize there are other questions on binary search implementations in C, but I'm trying to figure this out from scratch with my own code (and some guidance of course). Thanks!</p>