tags:

views:

66

answers:

1

Hi all, I have using ncurses library to show some funny output in the screen.....but in d middle of the program i need to go out temporary from ncurses...so i calling endwin()...after this state my program should be able to using printf() to show a menu to user.Unlucky,my program was unable to show the menu.i try using fflush() after printf() then it's able to show the menu on the screen. Can anyone tell me that why after calling endwin() ,the terminal can't return to normal and we'r unable to using printf() to show message on the terminal?

A: 

Use def_prog_mode prior to endwin to save state. After returning, do: reset_prog_mode and then refresh. Your original screen will be shown.

Yes, after using printf you have to do: fflush(stdout).

rahul