HI people,
I am trying to delete numbers from any text file. I have this much so far:
Code:
int main(){
char c, filename[10]; FILE *fp;
printf("Eneter a filename");
scanf("%s", filename);
if((fp=fopen(filename, "r")) !=NULL){
while ((c=fgetc(fp)) !=EOF)
fputc(c, stdout);
}
else{
printf("could not open file ", filename);
}
if (isxdigit(fputc(c, stdout))){
printf("\nThere is a number");
}
else
{
printf("\nThere are no numbers");
}
printf(" \nEnter a filename");
scanf("%s", filename);
}
The files opens, and compiles but it does not match numbers.
Can anyone help
thanks
rick