i have read in one of links, there its documented
Quote:
The job of printw is to update a few flags and data structures and write the data to a buffer corresponding to stdscr. In order to show it on the screen, we need to call refresh() and tell the curses system to dump the contents on the screen.
|
but i am using following code
Code:
int main ()
{
char ch;
initscr();
printw("Enter a char :");
ch=getch();
printw("You Entered '%c' ",ch);
getch();
endwin();
return 0;
}
the code does not have
but have one getch() extra,its showing out put on the window.
without that getch() the program is getting terminated in falsh so we cant observe the out put .
my question is how its printing o/p on window without refresh().