Posted by Bernie Siegrist on 1999-09-16
Let's say I have the following ANSI-C code...
#include <stdio.h>
char Ch ;
FILE *File1 ;
void main()
{
File1 = fopen("guestbook.html","r+") ;
if (!File1)
{
// Error message here
} else {
while (!feof(File1))
{
putc(getc(File1),stdout) ;
}
fclose(File1) ;
}
}
This works fine, except that it appends a #255 at the end of the output.
The funny thing is that this only happens on Unix systems, not in
DOS/Windoze. Why this?? (If I'm making some dumb mistake please forgive me,
I'm fairly new to C.)
Previous post | Next post | Timeline | Home