www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/25/21:06:18

Xref: news2.mv.net comp.os.msdos.djgpp:7878
From: babcock AT shell1 DOT cybercom DOT net (Robert Babcock)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Getc(), putc() and feof() acting very wierdly
Date: 25 Aug 1996 20:32:30 -0400
Organization: A poorly-installed InterNetNews site
Lines: 9
Message-ID: <babcock.841019428@cybercom.net>
References: <4vockq$ri5 AT nuntius DOT u-net DOT net>
NNTP-Posting-Host: shell1.cybercom.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

sam AT beavis DOT u-net DOT com (Sam) writes:

>which is about as simple as I can think of. Infile and outfile are
>both FILE * s, and are opened and closed with fopen and fclose as mode
>"r" and "w".

Try modes "rb" and "wb" for binary files.  Your read is probably
stopping at the first control-z, plus you are getting unwanted CR/LF
translations.

- Raw text -


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