Skip to content

Instantly share code, notes, and snippets.

@jen6
Created July 28, 2015 07:40
Show Gist options
  • Save jen6/5e6839c75d90fde8e4d6 to your computer and use it in GitHub Desktop.
Save jen6/5e6839c75d90fde8e4d6 to your computer and use it in GitHub Desktop.
while (true)
{
if (!fgets(buf, MAX_SIZE, file_read)
|| ferror(file_read)
|| feof(file_read))
break;
fwrite(buf, sizeof(char), MAX_SIZE, file_write);
}
while (!feof(file_read))
{
fgets(buf, MAX_SIZE, file_read)
fwrite(buf, sizeof(char), MAX_SIZE, file_write);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment