-
initscr
鎖定
initscr,是計算機編程的函數語言之一。
- 外文名
- initscr
- 函數原型
- WINDOW * initscr(void);
- 頭文件
- #include
- 特 點
- 在一個程序中只能調用一次
initscr頭文件
#include<curses.h>
initscr函數原型
WINDOW * initscr(void);
initscr函數説明
initscr範例
[root@localhost chapter06]# cat screen1.c #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); printf("%s", "Hello World"); refresh(); sleep(2); endwin(); exit(EXIT_SUCCESS); } [root@localhost chapter06]# gcc -o screen1 screen1.c -lcurses [root@localhost chapter06]# ./screen1
- 詞條統計
-
- 瀏覽次數:次
- 編輯次數:12次歷史版本
- 最近更新: 翠翠DAYTOY