Why it's bad to use feof() to control a loopCode:while(!feof(Patfile)&& found==false) { fscanf(Patfile,"%d%s%s",&cntct,&name,&address); ... if(!feof(Patfile)) { system("cls"); cout<<" \nLIST OF CONTACTS"; display(); while(!feof(Patfile)) { if(fscanf(Patfile,"%d%s%s",&idno,&name,&address)>0) cout<<setw(15)<<idno<<setw(25)<<name<<setw(25)<<address<<"\n"; ... while(!feof(Patfile)) { if(fscanf(Patfile,"%d%s%s",&idno,&name,&address)>0) ... while(!feof(tempPatfile)) { if(fscanf(tempPatfile,"%d%s%s",&idno,&name,&address)>0) ... while(!feof(Patfile)&&found==false) { if(fscanf(Patfile,"%d%s%s",&idno,&name,&address)>0)