论坛: 编程破解 标题: 关于c语言的清屏 复制本贴地址    
作者: dormouse [dormouse]    论坛用户   登录
谁知道怎么清楚上边已经运行过的程序结果清楚掉?别和我说多用几个"\n"啊!!!

地主 发表时间: 04/20 09:05

回复: 286 [unique]   版主   登录
文本clrscr();
图形cleardevice();

B1层 发表时间: 04/20 11:09

回复: dormouse [dormouse]   论坛用户   登录
怎么用啊?不成啊。具个例子呗?成不?谢谢啦。

B2层 发表时间: 04/23 11:01

回复: 286 [unique]   版主   登录
void main()
{
    printf("Press any key to clear screen");
    getch();
    clrscr();
    return;
}
////////////////////
//说明,DOS下图形编程好长时间不用了,以下代码仅供参考,不一定完全正确。
#include <graphics.h>
void main()
{
     int GD,GM=DETECT;
     initgraph(GD,&GM,"");
     outtextxy(10,10,"Press any key to clear screen.");
     getch();
     cleardevice();
}

B3层 发表时间: 04/23 12:23

回复: dormouse [dormouse]   论坛用户   登录
谢谢了!
如果我想把上次的运行的屏幕残留的结果清楚掉clrsrc()应该加在哪里?也就是说每次运行的时候结果都是显示在屏幕的最上边。好多书都没有介绍。
main()
{
//*here?*//
printf("PPPPPPPPPP\n");
//*here?*//
}

B4层 发表时间: 04/23 14:35

回复: dormouse [dormouse]   论坛用户   登录
286请?

B5层 发表时间: 04/25 20:26

回复: 286 [unique]   版主   登录
main()
{
//*here?*//    <---------------Just here.
printf("PPPPPPPPPP\n");
//*here?*//




B6层 发表时间: 04/26 09:20

回复: xhw_73 [xhw_73]   论坛用户   登录
说得好!

B7层 发表时间: 04/26 10:07

回复: seawman [yht1987]   论坛用户   登录
不知道用system("cls");能搞定吗~

B8层 发表时间: 04/26 16:46

回复: haounix [haounix]   论坛用户   登录
用SYSTEM("CLS");
可以搞定啊!
程序:
  #include "process.h"
main ()
{
printf("asdf");
system("cls");
}


B9层 发表时间: 04-07-11 10:55

回复: hahaflying [hahaflying]   论坛用户   登录
clrscr()要在变量申明完后才能用,否则会提示错误

B10层 发表时间: 04-07-11 11:52

回复: ricol [ricolwang]   论坛用户   登录
用window函数建个仅供输出结果的小窗口,以后输出前,先用clrscr()清除。

B11层 发表时间: 04-07-19 15:15

论坛: 编程破解

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号