因为你用了getch(); 所以应该包含头文件#include 把你代码发上来.我晕...你把return 0加在getch(); 上面根本没机会执行getch(); 程序就结束了...把两个位置换一下问题解决