I am trying to copy a file from a specified library to the current directory. I can copy text files perfectly. Any other files become corrupt. The program detects a feof bef
You need to specify the "b" option to fopen:
"b"
fopen
source = fopen("./library/rfc1350.txt", "rb"); ... destination = fopen("rfc1350.txt", "wb");
Without it, the file is opened in text ("t") mode, and this results in translation of end-of-line characters.
"t"