- 论坛徽章:
- 0
|
源程序是建立一个简单的菜单:
#include <curses.h>;
#include <menu.h>;
char *colors[13]={
"Black","Charcoal","Light Gray","Brown","Camel","Navy","Light Blue","Hunter Green","Gold","Burgundy",
"Rust","White",(char *)0;
};
ITEM *items[13];
main()
{
MENU *m;
ITEM **i=items;
char **c=colors;
initscr();
nonl();
raw();
noecho();
wclear(stdscr);
while(*c)
*i++=new_item(*c++,"" ;
*i=(ITEM *)0;
m=new_menu(i=items);
post_menu(m);
refresh();
sleep(5);
unpost_menu(m);
refresh();
free_menu(m);
while(*i)
free_item(i++);
endwin();
exit(0);
}
但是出现了这样的问题
是什么事呢? |
|