[Courses] [C] Lesson 13: exc1 answer, problem on exc2
Laurel Fan
laurel at sdf.lonestar.org
Thu Dec 5 16:11:30 EST 2002
On Thu, Dec 05, 2002 at 05:58:08PM -0500, Morgon Kanter wrote:
> -----------------
> Okay, here is exercise 2. I'm having a bit of trouble in this one because in
> the output file, it copies correctly but it adds the character "y" with a
> sideways-colon over top of it on a newline. Any ideas why?
Here's a hint:
Files do not really contain EOF.
If that's not enough...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Another hint:
[snip]
> while(current_char != EOF) {
First, You check if current_char is EOF.
> current_char = fgetc(file_read);
Then you set current_char by reading it from the file.
Could current_char == EOF here?
Does that help?
--
laurel at sdf.lonestar.org
http://dreadnought.gorgorg.org
More information about the Courses
mailing list