TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: STEVE JOHNSON
from: KURT KUZBA
date: 1998-05-13 06:41:00
subject: Help!

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.