www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/25/08:31:23

Message-ID: <34017C12.4ED0@cornell.edu>
Date: Mon, 25 Aug 1997 08:35:30 -0400
From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Reply-To: asu1 AT cornell DOT edu
Organization: Cornell University http://www.cornell.edu
MIME-Version: 1.0
To: Adam W Lee <adalee AT sendit DOT sendit DOT nodak DOT edu>
CC: djgpp AT delorie DOT com
Subject: Re: Problem with fstreams...
References: <5tps7b$rpo$1 AT news DOT sendit DOT nodak DOT edu> <34008E0F DOT 2FA4 AT cornell DOT edu> <5trdmc$d79$2 AT news DOT sendit DOT nodak DOT edu>

I said:

> : it is more helpful to specify the exact problem and give the exact 
> : code that produces it. without that, all others can do is guess.
> : so, i am guessing that you are dealing with binary files, but 
> : opening them in text mode. if this is the case, then read the 
> : fstream docs on how to open the files in binary mode.

Adam W Lee wrote:
> I did specify the exact problem, it quits copying halfway through!  

this is what YOU wrote:

Adam W Lee wrote:
> I'm trying to write a program to read a file and write it to another 
> file in C++, but my program quits like halfway through the file with a 
> read error or something to that effect...  Here's some pseudo-code.


'something to that effect', 'here's some psuedo code'? is that exact?

> And I also provided source...  Like I said, though, it works great 
> under Unix.

you posted that after your first message. i wrote my response between
the two postings. when i saw your post, i realized that my diagnosis was
most probably correct, so i didn't see any point in e-mailing you again.

since then, did you actually try opening the files in binary mode to see
if the problem goes away? also, even in your second post, you did not
give any clues as to the nature of the files: binary or text?

-- 
   Sinan
 
*******************************************************************
 A. Sinan Unur                                WWWWWW
                                              |--O+O
 mailto:sinan DOT unur AT cornell DOT edu                C   ^ 
 http://www.people.cornell.edu/pages/asu1/     \  ~/ 
*******************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019