Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ralf From: ralf+@cs.cmu.edu (Ralf Brown) Newsgroups: comp.os.msdos.programmer Subject: Re: Turbo C and ^Z's Message-ID: <1991Jan4.180428.4310@cs.cmu.edu> Date: 4 Jan 91 18:04:28 GMT References: <10251@hydra.Helsinki.FI> Sender: netnews@cs.cmu.edu (USENET News Group Software) Organization: School of Computer Science, Carnegie Mellon Lines: 14 In article otto@tukki.jyu.fi (Otto J. Makela) writes: }In article <10251@hydra.Helsinki.FI> wirzeniu@cs.Helsinki.FI (Lars Wirzenius) writes: } In article otto@tukki.jyu.fi (Otto J. Makela) writes: } > if(f=fopen(filename,"a+b")) { } "a" means that all writes happen at the end of the file, use "r+b" instead }ALL WRITES ? Come on, the first thing I do after that is to seek the file... That's correct. The Turbo C standard library seeks to the end of the file every time you make a write call to a file opened in Append mode. -- {backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/3.1 BITnet: RALF%CS.CMU.EDU@CMUCCVMA AT&Tnet: (412)268-3053 (school) FAX: ask DISCLAIMER? Did | Everything is funny as long as it is happening to I claim something?| someone else. --Will Rogers