系统(“暂停")说明 [英] system("pause") clarification

查看:36
本文介绍了系统(“暂停")说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 system("pause") 时,屏幕上会出现一行按任意键继续...".

When i use system("pause"), then a line "Press any key to continue..." shows up on the screen.

这很烦人,使阅读输出相当麻烦.

This is iritating and makes reading the output quite cumbersome.

有什么办法可以阻止这种情况发生吗?

Is there some way to stop this from coming?

推荐答案

你的意思是你想按任意键继续但不显示按任意键继续"在屏幕上吗?试试这个 getchar(); 这将捕获从键盘输入的一个字符并继续.

Do you mean that you want to press any key to continue but not to display the "Press any key to continue" on the screen? Try this getchar(); this will capture one character typing from keyboard and continue.

这篇关于系统(“暂停")说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆