Re: Need some help with I/O
From: Irrwahn Grausewitz (irrwahn33_at_freenet.de)
Date: 11/18/03
- Next message: Mike Wahler: "Re: Need some help with I/O"
- Previous message: Mike Wahler: "Re: property operator"
- In reply to: Les Coover: "Re: Need some help with I/O"
- Next in thread: Les Coover: "Re: Need some help with I/O"
- Reply: Les Coover: "Re: Need some help with I/O"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 Nov 2003 21:57:44 +0100
"Les Coover" <lcc66604@cox.net.spam> wrote:
<snip>
> I have struggled and struggled with this and still can not get it.
>
> My textboox has less than a paragraph on the fgets() function
> and about the same on the other functions you mentioned,
> the spaces don't matter
> I will use underscores. But there still is a problem, the following code
> compiles and runs ok, it even builds a text file, but when I enter data
> as in the "Example" nothing appears in the text file.
<code snipped>
Your code looks correct, albeit it still lacks some error checking.
I was able to compile and run it, which leads me to a question:
How do you terminate the program after entering the data?
Would you mind to insert this line:
fflush( file );
in the while loop after fprintf? (OK, two questions...)
Does this change the behaviour? (Yes, right, now it's three
questions... ;-)
Regards
-- Irrwahn (irrwahn33@freenet.de)
- Next message: Mike Wahler: "Re: Need some help with I/O"
- Previous message: Mike Wahler: "Re: property operator"
- In reply to: Les Coover: "Re: Need some help with I/O"
- Next in thread: Les Coover: "Re: Need some help with I/O"
- Reply: Les Coover: "Re: Need some help with I/O"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|