Here is the Part of the program that i am trying to compile using gcc compiler on ubuntu 14.04.
#include<stdio.h>
#include<string.h>
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", &sep);
}
this is the Error:
/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
fpurge is not in the standard C library. It is nonstandard and not
portable. It is a BSD function.
http://bytes.com/topic/c/answers/845246-fpurge
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With