int main(){ ifstream in("test.txt"); char ch; while(ch!=EOF) {in.get(ch);cout<<ch;}}这样子它一直在读文件的最后一个字符啊!
你好!!
程序改了,注意看后面的注释: