loop is incorrect. Here is how to read until end of file. fgets() returns NULL on end-of-file or some other type of error.
while( fgets(s, MAX_BUFF, file) != NULL)
{
}
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,950 posts
since Aug 2005