你如何清除C中的控制台屏幕? [英] How do you clear the console screen in C?

查看:16
本文介绍了你如何清除C中的控制台屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了使用 system("cls") 之外,还有没有正确"的方式来清除 C 中的控制台窗口?

Is there a "proper" way to clear the console window in C, besides using system("cls")?

推荐答案

嗯,C 不懂屏幕的概念.所以任何代码都不能移植.也许看看 conio.hcurses,根据你的需要吗?

Well, C doesn't understand the concept of screen. So any code would fail to be portable. Maybe take a look at conio.h or curses, according to your needs?

无论使用什么库,可移植性都是一个问题.

Portability is an issue, no matter what library is used.

这篇关于你如何清除C中的控制台屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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