www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/28/04:13:54

Sender: nate AT millcomm DOT com (nate)
Date: Sun, 28 Apr 1996 03:01:33 -0500 (CDT)
From: nate <nate AT mill2 DOT MillComm DOT COM>
Sender: nate <nate AT mill2 DOT MillComm DOT COM>
Reply-To: nate <nate AT mill2 DOT MillComm DOT COM>
Subject: gxx ios::binary file reading/writing
To: djgpp AT delorie DOT com
Message-ID: <Pine.3.89.9604280237.A9187-0100000@mill2.MillComm.COM>
MIME-Version: 1.0

question for anyone using gxx for reading and writing binary files:

I'm using DJGPP version 2.0 with cwsdpmi v.90+, coding in c++ and 
compiling with gxx, and I am running into difficulties updating existing 
binary files.  Reading in binary information via <ifstream>.read works 
without any problems (i've been using it for weeks), however 
<ofstream>.write only wants to work if the file is new, or if the ofstream 
object is opened with (ios::binary | ios:app) (append) 
flags.  If I attempt to <ofstream>.seekp a random location in the file and 
<ofstream>.write, the program freezes and locks up the machine.  I've 
read all the information  in the DJGPP info directory, and scowered the 
net for some assistance with ths problem and I cannot determine why I am 
having these difficulties modifying random locations of binary files. If 
anyone has any ideas, or knows about a problem/bug, etc, please drop me 
mail about it, as I don't sunscribe to the list.  Thank you.

-Nate Erkkilla <nate AT millcomm DOT com>


- Raw text -


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