www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/28/06:12:46

Xref: news2.mv.net comp.os.msdos.djgpp:3206
From: nate AT millcomm DOT com (nate)
Newsgroups: comp.os.msdos.djgpp
Subject: ios::binary fstream file problems
Date: 28 Apr 1996 08:04:24 GMT
Organization: Millennium Communications, Inc.
Lines: 19
Message-ID: <4lv8q8$ht0@misery.millcomm.com>
NNTP-Posting-Host: mill2.millcomm.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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
some mail, as I do not make it to usenet on a regular basis.

-Nate Erkkilla <nate AT millcomm DOT com>

- Raw text -


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