曲径通幽论坛

标题: curses 相关函数 --- clrtoeol [打印本页]

作者: beyes    时间: 2009-3-28 23:51
标题: curses 相关函数 --- clrtoeol
函数原型
int clrtoeol(void);

函数作用
从光标所在位置删除到所在的行末

测试代码

#include <stdlib.h>
#include <curses.h>

int main()
{

        initscr();
        move(3,10);
        printw("123456789");
        refresh();
        sleep(3);

        move(3,13);  /* 从字符 3 删除到末尾 */
        clrtoeol();
        refresh();
        sleep(3);

        endwin();
        exit(EXIT_SUCCESS);
}

说明
程序一开始输出如下图所示:


接着执行 clrtoeol() 函数后:





欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) Powered by Discuz! X3.2