頭檔案
#include <curses.h>
函式原型
WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x);
範例
#include <unistd.h>
#include <stdlib.h>
#include <curses.h>
int main()
{
WINDOW *new_window_ptr;
initscr();
new_window_ptr = newwin(10, 20, 5, 5);
wrefresh(new_window_ptr);
refresh();
sleep(2);
wclear(new_window_ptr);
delwin(new_window_ptr);
endwin();
eixt(0);
}
[root@localhost window]# gcc -o window window.c -lcurses