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 open the files in binary format rather than text format. In your calls to fopen, use "rb" and "wb" rather than "r" and "w" respectively.
fopen
"rb"
"wb"
"r"
"w"