title: Error Using fpurge(stdin);
body: <p>Here is the Part of the program that i am trying to compile using gcc compiler on ubuntu 14.04.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  main() {
      int i;
      char str[50], pat[3];
      char sep;
      printf("Enter the sting to seperate\n ");
      scanf("%s", str);
      fpurge(stdin);
      printf("Enter the patern in Numbers to seperate Example : 1 2 3\n");
      //__fpurge(stdin);
      scanf("%s", pat);
      fpurge(stdin);
      printf("Enter the seperator Example: ; or enter ,space");
      scanf("%c", &amp;sep);
  }
  </code></pre>
  
  <p>this is the Error:</p>
  
  <pre><code> /tmp/cc0bHLkO.o: In function `main':
   str_sepert.c:(.text+0x4d): undefined reference to `fpurge'
   str_sepert.c:(.text+0x95): undefined reference to `fpurge'
   collect2: error: ld returned 1 exit status
  </code></pre>