Is there a standard equivalent to getch () in C ++?

I know that getch is not a standard C / C ++ function, but I like it because you do not need to press the enter key before returning. So I would like to know if there is any equivalent in standard C ++ that has the same effect (doesn't require pressing the enter key)?

I read similar questions on this site, but not one of their answers says whether there is a standard and portable equivalent or not.

+6
source share
2 answers

There is a portable-ish equivalent if you use one of the curses libraries, for example ncurses

+6
source

Not the equivalent, but the same effect (only victory):

system( "pause >nul" ); 
-3
source

Source: https://habr.com/ru/post/949980/


All Articles