EOF isn't stored in the file, so there is nothing to read.
Simply use
while ( fgets(buff,sizeof(buff),fin) != NULL ) {
// you got a line, search out all the commas
}
Type: Posts; User: Salem
EOF isn't stored in the file, so there is nothing to read.
Simply use
while ( fgets(buff,sizeof(buff),fin) != NULL ) {
// you got a line, search out all the commas
}