if i want to read from a file until the end of a file.. i would do this..
struct line
{
int p1;
int p2;
}
typedef line Line;
Line Lines [5];
FILE *fptr
/* file open and stuff */
while (fscanf(fptr, "%d%d",Lines[i].p1, Lines[i].p2) != feof)){
i++;}
fclose (fptr);
im getting an error..
i dont know whats wrong..