From: gallant AT iro DOT umontreal DOT ca (Jean-Francois Gallant) Date: Mon, 20 Sep 1993 18:04:01 -0400 To: ERIC HILDEBRANDT Subject: Re: problems with binary random file access using ifstreams Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > > hello everybody, > > I used both versions of the libraries, the libgpl23 > (or so, the one out of the /pub ) > and the one in dj*.* files. > > The funny thing is, that when I am using the C stdio functions > fopen, fseek and fread everything works fine. > It is just when I use the ifstream.read() that I get problems. > ifstream.seekg() seems to work, it might be > the extraction with read() or get() that causes the trouble. > Probably a bit late to answer your question... It's been a couple of weeks since I last "cleaned" my mail box...! But since it seems nobody answered it yet (on the list, at least), I thought my experience would be helpful! Yes, I had similar problems with C++ IO streams. There are still many bugs in this part of the library, especially with tell/seek operations. If I remember well (it's been sometime since I last played with that), you will find that if you read your file sequentially, from beginning to end, everything works fine. It's when you move back and forth into it that problems begin. Did somebody try to fix those bugs? J-F. -- ------------------------------------------------------------------------------ Jean-Francois Gallant | Informatique et Recherche Operationnelle Tel.: (514)-343-6111, ext. 3513 | Universite de Montreal email: gallant AT iro DOT umontreal DOT ca | C.P. 6128, Succ. A | Montreal, Quebec, Canada, H3C 3J7 ------------------------------------------------------------------------------