title: Trying to create a binary tree of structs
body: <p>Here are the structs, I want to insert organT to the tree.</p>
  
  <pre><code>typedef struct {
      int month;
      int day;
      int year;
  } dateT;
  
  typedef struct {
      int hour;
      int minute;
  } timeT;
  
  typedef struct {
      char name[SIZE];
      char organname[SIZE];
      char bloodtype[BLOODTYPESIZE];
      dateT dateAdded;
      timeT timeAdded;
  } organT;
  
  struct node{
      struct data;
      struct node* left;
      struct node* right;
  };
  
  struct node* insert(struct node *root, struct node *element);
  struct node* create_node(struct val);
  </code></pre>
  
  <p>Here is the insert and node initialization code:</p>
  
  <pre><code>struct node* insert(struct node *root, struct node *element) {
  
    // Inserting into an empty tree.
    if (root == NULL)
      return element;
    else {
  
      // element should be inserted to the right.
      if (element-&gt;data &gt; root-&gt;data) {
  
        // There is a right subtree to insert the node.
        if (root-&gt;right != NULL)
          root-&gt;right = insert(root-&gt;right, element);
  
        // Place the node directly to the right of root.
        else
          root-&gt;right = element;
      }
  
      // element should be inserted to the left.
      else {
  
        // There is a left subtree to insert the node.
        if (root-&gt;left != NULL)
          root-&gt;left = insert(root-&gt;left, element);
  
        // Place the node directly to the left of root.
        else
          root-&gt;left = element;
      }
  
      // Return the root pointer of the updated tree.
      return root;
    }
  }
  
  // creating a new node
  struct node* create_node(struct val) {
  
      struct node* temp;
  
      temp = (struct node*)malloc(sizeof(struct val));
      temp-&gt;data = val;
      temp-&gt;left = NULL;
      temp-&gt;right = NULL;
  
      return temp;
  }
  </code></pre>
  
  <p>I would like to insert multiple structs into a binary tree. The structs I want to enter are organT. The errors I'm getting are struct node has no member 'data', val undeclared, parameter name omitted, etc.</p>