Search code examples
ncursesgetch

What is the difference between wgetch() and getch() in ncurses?


I have looked and I can't seem to find this mentioned anywhere.


Solution

  • getch() is equivalent to wgetch(stdscr). The function wgetch does wrefresh of the specified window and then reads input. So getch() would refresh stdscr and then wait for input.

    more info here: https://stackoverflow.com/a/22121866/515212