title: Why the use of getch() shows error?
body: <pre><code>struct node
  {
      int data;
      struct node *next;
  }   *start=NULL;
  
  void create()
  {
      char ch;
      do
      {
          struct node *new_node,*current;
  
          new_node = (struct node *)malloc(sizeof(struct node));
  
          printf("\nEnter the data : ");
          scanf("%d",&amp;new_node-&gt;data);
          new_node-&gt;next = NULL;
  
          if(start == NULL)
          {
              start = new_node;
              current = new_node;
          }
          else
          {
              current-&gt;next = new_node;
              current = new_node;
          }
  
          printf("nDo you want to creat another : ");
          ch = getch();
      } while(ch!='n');
  }
  </code></pre>
  
  <p>This is the part of the code which contains <code>getch()</code></p>
  
  <p>When I try to run this code in an online compiler I am getting this error:
  undefined reference to <code>getch</code>
  collect2: error: 1d returned 1 exit status</p>
  
  <p>How to solve this problem?...Please help</p>