delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/26/19:32:13

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ifstream (FILENAME, ios::binary). Can't Read!!!
Date: Tue, 22 Jul 1997 18:17:59 -0400
Organization: Cornell University http://www.cornell.edu
Lines: 25
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <33D5318B.25E@cornell.edu>
References: <01bc96d2$0843f060$29fc82c1 AT damien>
Reply-To: asu1 AT cornell DOT edu
NNTP-Posting-Host: cu-dialup-0083.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Richard Birch wrote:

> main () {
>     clrscr();
>     ifstream src("rhide.exe", ios::bin);

changing the line above to
     ifstream src("rhide.exe", ios::in | ios::bin);

seemed to work. i have a question though:

>     double num_read = 0;

do you ever expect to read a fractional number of bytes from a file?
-- 
   Sinan
 
*******************************************************************
 A. Sinan Unur                                WWWWWW
                                              |--O+O
 mailto:sinan DOT unur AT cornell DOT edu                C   ^ 
 http://www.people.cornell.edu/pages/asu1/     \  ~/ 

Unsolicited e-mail is _not_ welcome, and will be billed for.
*******************************************************************

- Raw text -


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