delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/29/06:00:55

From: Jamie Love <jamie DOT love AT clear DOT net DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: file problems
Date: Wed, 29 Jul 1998 20:55:44 +1200
Organization: CLEAR Net, http://www.clear.net.nz/
Lines: 27
Message-ID: <35BEE390.B9DF89E8@clear.net.nz>
NNTP-Posting-Host: d4-u4.wgtn.clear.net.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi, I have coded some file routines for my linked list class, but when I
write the file (I won't bore you with the details) it seems that
something goes wrong.

Ie, I print out 11 integers and get a 45 byte file. How is this possible
if I open this file in binary mode

ie, with the line

ifstream infile("test.txt", ios::bin);

and 

iostream outfile("test.txt", ios::bin);

It works out that for the first 14 integers everything is ok, but after
that things get totally out of whack.

Anyone have any ideas?
-- 
Jamie Love

 - jamie DOT love AT clear DOT net DOT nz
 - http://www.geocities.com/siliconvalley/horizon/4532
----


- Raw text -


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