I need a cross platform way of handling this:
When I press enter in "cin" line, I want it to clear everything processed including the newline.
Is it even possible? Or do I need to find some crossplatform getch() implementation and do it that way?
I need a cross platform way of handling this:
When I press enter in "cin" line, I want it to clear everything processed including the newline.
Is it even possible? Or do I need to find some crossplatform getch() implementation and do it that way?
The only cross-platform way I can see is to forego the standard input and output streams altogether, and use something like ncurses (which have a Windows port).
It can handle reading keys directly, with or without echoing, and can clear the screen.