Originally Posted by
MK27
If you are using fgetc, you need to use an int as the return value. However, if you want to copy a "binary" (such as an mp3, etc), you would want to use fread into a signed char buffer. This is because a signed char is literally one byte, and a file is literally a series of bytes, which are signed char values (-128 to 127). Although this is a number, it is not at all a C integer, which is 4 bytes (or 8 bytes on 64bit) long.
There may be a problem with how fgetc reacts to 0, which can exist in a binary file but does not occur in text files.