char dol; cin.get(dol); while(dol!=EOF) { cout<<dol; cin.get(dol); }
题主是用什么工具?我用vs2015测试了一下没有问题啊,ctr+z之后无非是显示^Z;我记得ctr+z好像是linux中用来终止进程的