hi guys
say you have a extern file with numbers from 0-20. so it contains
the program's supposed to give all numbers greater than the number given on keyboard.Code:1\n2\n3\n4\n......\n20
my file's called List however. so the sketch would look like this:
now somehow I should run the pfile pointer through the data in the "list" file so it could find the one that are greater than the number given via scanf....Code:FILE *pfile; pfile=fopen("C:\user\list.txt", "r+"); if(pfile != NULL){ ....... //my problem fclose(pfile); } //it'd better follow with a else command in case the file doesn't work right
and I can't figure how exactly...would running this work?
Code:for(pfile=0;pfile<=20;pfile++){
I'd be grateful for any hint....



LinkBack URL
About LinkBacks



).