title: Linked List Pointer Without A Cast Error
body: <p>I'm getting assignment makes pointer from integer without a cast errors on lines 46 and 53, the two lines with double asterisks on either side, and for the life of me, I cannot figure out why. Linked lists are very new to me, I don't know how they work completely yet.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  
  struct node_def
  {
      int data;
      struct node_def *next;
  };
  typedef struct node_def node;
  
  node *makeNode (int a);
  node *insertFront(node *head,node *new);
  void printList(node *head);
  
  int numNodes = 0;
  
  int main()
  {
      srand(time(0));
      int r = rand() % 10000;
      int i = 0;
  
      node *head = NULL;
      node *tmp = NULL;
  
      printf("How many nodes? ", numNodes);
      scanf("%d", numNodes);
      printf("\n");
  
      head = insertFront(head, tmp);
  
      for(i = 0; i &lt; numNodes; i++)
      {
          makeNode(r);
          printList(head);
      }
      printf("\n");
  
      return 0;
  }
  node *makeNode (int a)
  {
      node *new = malloc(sizeof(node));
      **new = a;**
  
      return new;
  }
  node *insertFront(node *head, node *new)
  {
  
      **new-&gt;data = head;**
      new-&gt;next = new;
  
      return 0;
  }
  void printList(node *head)
  {
      int j = 0;
      for(j = 0; j &lt; numNodes; ++j)
      {  
          while (head != NULL)
          {
              printf(" %4d", head-&gt;data);
              head = head-&gt;next;
          }
          if(j % 10 == 0)
              printf("\n");
      }
      return;
  }
  </code></pre>
  
  <p>new = a is meant to make new nodes and assign them a random number from 0 - 9999.</p>