当前位置: 技术问答>linux和unix
正在学习LINUX c+curses 编程
来源: 互联网 发布时间:2016-03-04
本文导语: 怎么BOX(win1,0,0)画不出框来???,试了一下box(win1,'-','|'),可以但不好看,源程序如下: #include int main(int argc, char* argv[]){ WINDOW* win1; initscr(); win1 = newwin(10, 60, ...
怎么BOX(win1,0,0)画不出框来???,试了一下box(win1,'-','|'),可以但不好看,源程序如下:
#include
int main(int argc, char* argv[]){
WINDOW* win1;
initscr();
win1 = newwin(10, 60, 1, 1);
// box(win1,0,0);
box(win1,'-','|');
touchwin(win1);
mvwaddstr(win1, 1, 0, "Window1!");
wrefresh(win1);
wgetch(win1);
//for(;;);
endwin();
return 0;
}
有请大虾!!
#include
int main(int argc, char* argv[]){
WINDOW* win1;
initscr();
win1 = newwin(10, 60, 1, 1);
// box(win1,0,0);
box(win1,'-','|');
touchwin(win1);
mvwaddstr(win1, 1, 0, "Window1!");
wrefresh(win1);
wgetch(win1);
//for(;;);
endwin();
return 0;
}
有请大虾!!
|
curses兼容性不够,不如就用字符组织。