SJ> However, I've caught a little snag. I tried to copy a
SJ> file 906,294 bytes in size and the program only copies
SJ> 201 bytes of it.
SJ> srcfile = fopen (src, "r");
Welcome to the wonderful world of DOS!
Files are opened in text mode by default.
If you look at the file via a hex dump or hex editor,
the 201st character will be '0x1a', the DOS EOF character.
srcfile = fopen (src, "br");
Now it will open for binary, instead of text, and will not
report an EOF at the first '0x1a' it hits in the file. :)
You should be able to use ifstream and ofstream, also,
which would be more a C++ solution.
> ] I'd say something clever, but you have nothing low-fat......
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)
|