screen1.c

来自「linux的程序设计第二版 是学习LINUX下程序设计的好教程哦」· C语言 代码 · 共 25 行

C
25
字号
/*  We add in the curses.h header file    and in the main function we make calls to initialize and reset the curses library.  */#include <unistd.h>#include <stdlib.h>#include <curses.h>int main() {    initscr();/*  We move the cursor to the point (5,15) on the logical screen,    print "Hello World" and refresh the actual screen.    Lastly, we use the call sleep(2) to suspend the program for two seconds,    so we can see the output before the program ends.  */    move(5, 15);    printw("%s", "Hello World");    refresh();    sleep(2);    endwin();    exit(EXIT_SUCCESS);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?