清除屏幕? [英] Clear Screen?

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

问题描述

除了一堆\ n'或

endl'之外,我如何清除屏幕上的文字?


Tim M.

解决方案

" Tim Mierzejewski" < TI ****** @ yahoo.com>写道...

如何清除屏幕上的文字,除了一堆\ n'或
endl'?




请阅读常见问题15.20。你可以在这里找到常见问题

http:/ /www.parashift.com/c++-faq-lite/

Victor


Tim Mierzejewski写道:< blockquote class =post_quotes>如何清除屏幕上的文字,除了一堆\ n'或
endl'?




C ++无法清除屏幕,如Victor指出的FAQ所示。

但是,您可以要求操作系统为您完成。执行

的最常见方法是Windows中的系统(cls);''和Linux中的系统(清除);''。

系统函数在< process.h>中定义

-

Unforgiven

>
我不仅不知道答案

我甚至不知道问题是什么

我的世界 - Metallica




" Unforgiven" < JA ******* @ hotmail.com>在消息中写道

news:bd ************ @ ID-136341.news.dfncis.de ...

Tim Mierzejewski写道:

如何清除屏幕上的文字,除了一堆\ n'或
endl'?
C ++无法清除屏幕,如常见问题解答Victor指出你



to。


嗯? C ++可以使用特定于操作系统的库做很多事情。不要说

C ++无法清除屏幕。相反,您应该说标准C ++不能清除屏幕。


但是,您可以要求操作系统为您完成。最常见的方法是在Windows和系统(清除)中使用系统(cls);在Linux中使用。
系统功能在< process.h>中定义

- 不可原谅

我不仅不知道答案<我甚至不知道问题是什么
我的世界 - Metallica



-

-Ashish

--------------------------------------------- -----------------------------

嗨!我是一个共享软件签名!发送


How do I clear the text from my screen, other than a bunch of \n''s or
endl''s?

Tim M.

解决方案

"Tim Mierzejewski" <ti******@yahoo.com> wrote...

How do I clear the text from my screen, other than a bunch of \n''s or
endl''s?



Please read FAQ 15.20. You can find FAQ
here: http://www.parashift.com/c++-faq-lite/

Victor


Tim Mierzejewski wrote:

How do I clear the text from my screen, other than a bunch of \n''s or
endl''s?



C++ can not clear the screen, as indicated in the FAQ Victor pointed you to.
However, you can ask the OS to do it for you. The most common ways to do
this are ''system("cls");'' in Windows and system("clear");'' in Linux. The
system function is defined in <process.h>

--
Unforgiven

"Not only do I not know the answer
I don''t even know what the question is"
My world - Metallica



"Unforgiven" <ja*******@hotmail.com> wrote in message
news:bd************@ID-136341.news.dfncis.de...

Tim Mierzejewski wrote:

How do I clear the text from my screen, other than a bunch of \n''s or
endl''s?
C++ can not clear the screen, as indicated in the FAQ Victor pointed you


to.

Huh? C++ can do a lot of things using the OS specific libraries. Dont say
C++ cannot clear the screen. Instead, you should say standard C++ cannot
clear the screen.

However, you can ask the OS to do it for you. The most common ways to do
this are ''system("cls");'' in Windows and system("clear");'' in Linux. The
system function is defined in <process.h>

--
Unforgiven

"Not only do I not know the answer
I don''t even know what the question is"
My world - Metallica


--
-Ashish
--------------------------------------------------------------------------
Hi! I''m a shareware signature! Send


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

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