Turbo C and ^Z's

Otto J. Makela otto at tukki.jyu.fi
Fri Jan 4 21:54:49 AEST 1991


In article <10251 at hydra.Helsinki.FI> wirzeniu at cs.Helsinki.FI (Lars Wirzenius) writes:
   In article <OTTO.91Jan3125711 at tukki.jyu.fi> otto at 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...
I'd like to point out I can't use "r+b", 'cause it'll fail if the file does
not exist beforehand.
--
   /* * * Otto J. Makela <otto at jyu.fi> * * * * * * * * * * * * * * * * * * */
  /* Phone: +358 41 613 847, BBS: +358 41 211 562 (CCITT, Bell 24/12/300) */
 /* Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE         */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * * * * * */



More information about the Comp.lang.c mailing list