Mail Archives: djgpp/2003/01/10/10:15:07
065211 AT bud DOT swin DOT edu DOT au (MURPHY, Jeremy W) wrote in message news:<avlqmm$3l7$1 AT c3p0 DOT cc DOT swin DOT edu DOT au>...
> Younskevicius, Edward (FL51) (Edward DOT Younskevicius AT honeywell DOT com) wrote:
> : Hello. Here is the description of what I think is a very peculiar bug, in
> : regards to the ANSI C fgets() and fputs() in DJGPP. I am reading a file in
>
> <snippety>
>
> If the file is open for both reading and writing, you must call
> `fflush', `fseek', or `rewind' before switching from read to write or
> from write to read.
>
> That's from the djgpp libc info, and could well be the solution.
> Otherwise, I dunno. :)
>
> Jeremy
fflush() did the trick. Silly thing to forget, really. Thanks so much
- this error has been driving me up the wall for two days. - Ed
- Raw text -