Hi There,
I'm trying to read a file character by character. When I write the
file out, there is one extra character which shows on the screen as a
solid circle with a small question mark in the middle.
Here is what I have:
infile = fopen("encrypte d.txt", "r");
outfile = fopen("plain.tx t", "w");
while(!feof(inf ile)) {
ch = fgetc(infile);
fputc(ch, outfile);
}
fclose(infile);
fclose(outfile) ;
Can someone please tell me why this character is getting added to the
outfile?
I'm trying to read a file character by character. When I write the
file out, there is one extra character which shows on the screen as a
solid circle with a small question mark in the middle.
Here is what I have:
infile = fopen("encrypte d.txt", "r");
outfile = fopen("plain.tx t", "w");
while(!feof(inf ile)) {
ch = fgetc(infile);
fputc(ch, outfile);
}
fclose(infile);
fclose(outfile) ;
Can someone please tell me why this character is getting added to the
outfile?
Comment