TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: AUKE REITSMA
from: STEVE JOHNSON
date: 1998-05-10 21:54:00
subject: Help!

  >Hi Steve,
  Hello! :)
AR>On 04 May 98, 16:16, you wrote to All
AR> SJ>   If you can take a look, please help!  Tell me all of your
  > SJ> thoughts!
AR>Just a few quickie type of notes ... ;-)
  Ah.  I thought I did that.  Opening it in binary.  I guess not. :(
AR> SJ> #include 
  > SJ> #include 
AR> SJ> const bufsize = 500000L;
AR>Might be way too large. Anything over 64k is likely to fail on various
  >compilers. Nor is it really useful. As long as you make it a not too small
  >integer multiple of the disk's cluster or sector size, you'll be all 
ght.
  Really?  Hmm, perhaps I'll try that.  I think I can fix up some code for
that purpose.  The problem is, I only know how to do variable array sizes
in Pascal.  (Just in case I bring it over to another machine someday.)
AR> SJ> int copyfile (char *src, char *dst)
  >...
  > SJ>         srcfile = fopen (src, "r");
AR>For any kind of file other than a plain ascii text file you should open 
he
  >file in binary mode: replace the "r" by "rb".
  >This is _very_ likely the major cause of the problem(s).
  Thanks, I thought I opened it as binary.
AR> SJ>         if (srcfile != NULL) {
AR> SJ>                 dstfile = fopen (dst, "w");
AR>For the same reason: replace "w" by "wb".
AR>BTW, you might move over to the C_echo as nothing in your stuff is really 

  I'd have to bug my Sysop again to get the C echo.. most of my stuff is in
C++, but this program didn't need any of that stuff.
Steve
---
 € QMPro 1.53 € I wouldn't be caught dead with a necrophiliac!
--- What a Rush!
---------------
* Origin: Space Dock,The Galactic Meeting Place(519)893-1153 (1:221/201)

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™.