Probably the newline characters (ascii 10 or 0x0a) are skipped by the iostream object when you are reading in the bytes. Try inserting the following line before doing the copy:
EDIT: copying a file byte-by-byte is not effective. Reading in the whole file and then writing it out in one big piece is also a bad idea as in that case you wouldn't be able to copy huge files. The best is the golden middle way, using a buffer (few, maybe 4-16 kilobytes) as a unit for reading/writing data to be effective.