我寫了一個程序,我使用了ncurses庫,我使用了,鍵菜單窗口和其他設施。 我運行我的程序沒有任何錯誤。 退出程序後,我看不到任何輸入數據(肯定與你運行passwd命令相同,並想輸入新密碼),例如,如果運行ls,我可以看到ls(當前目錄列表)的輸出,但我看不到ls字。 我如何解決這個問題? 一塊我的代碼:在提示符下ncurses禁止在bash中顯示cursur
WINDOW *menu_win,*qmenu_win,*amenu_win,*smenu_win;
char *query;
char *fields;
WriteFile *writePtr = new WriteFile();
ReadFile *readPtr = new ReadFile();
int highlight = 1;
int choice = 0;
int c;
initscr();
clear();
noecho();
cbreak(); /* Line buffering disabled. pass on everything */
startx = (80 - WIDTH)/2;
starty = (24 - HEIGHT)/2;
menu_win = newwin(HEIGHT, WIDTH, starty, startx);
keypad(menu_win, TRUE);
mvprintw(0, 0, "Use arrow keys to go up and down, Press enter to select a choice");
refresh();
print_menu(menu_win, highlight);
while (true)
哦,謝謝你我解決了你的建議,我把endwin()函數從我的程序中退出。 – PersianGulf 2011-12-20 18:41:05