title: getting C error: conversion to non-scalar type requested
body: <p>Hey I am getting this error:</p>
  
  <pre><code>error: conversion to non-scalar type requested
  </code></pre>
  
  <p>Here are my structs:</p>
  
  <pre><code>typedef struct value_t value;
  
  struct value{
     void* x;
     int y;
     value* next;
     value* prev;
  };
  
  typedef struct key_t key;
  
  struct key{
     int x;
     value * values;
     key* next;
     key* prev;
  };
  </code></pre>
  
  <p>Here is the code that is giving me problems:</p>
  
  <pre><code>struct key new_node = (struct key) calloc(1, sizeof(struct key));
  struct key* curr_node = head;
  
  new_node.key = new_key;
  
  struct value head_value = (struct value) calloc(1, sizeof(struct value))
  </code></pre>
  
  <p>Am I not suppose to use calloc on structs?  Also, I have a struct that I have created and then I want to set that to a pointer of that same struct type but getting an error.  This is an example of what I am doing:</p>
  
  <pre><code>struct value x;
  struct value* y = *x;
  </code></pre>
  
  <p>this gives me this error</p>
  
  <pre><code>error: invalid type argument of ‘unary *’
  </code></pre>
  
  <p>When I do y = x, I get this warning:</p>
  
  <pre><code>warning: assignment from incompatible pointer type
  </code></pre>