运行写的复制程序为何多出一个字节?
#include<iostream> using namespace std; void main() { FILE *in,*out; if((in=fopen("g:\\45.txt","r"))==NULL) {puts("read file error!"); exit(0);} if((out=fopen("g:\\67.txt","w"))==NULL) {puts("write file error!"); exit(0);}
while(!feof(in)) putc(getc(in),out); fclose(in); fclose(out); }
运行后,67.txt比 45.txt多出一个值为FF的无效字符.. ?