关于标准输入输出缓冲区残留问题

在每个最后不带\n的printf后面加fflush(stdout);
在每个不想受接收缓冲区旧内容影响的scanf前面加rewind(stdin);
另外请检查scanf的返回值

猜你喜欢

转载自blog.csdn.net/hueru/article/details/81028893
今日推荐