[Bug c++/86921] do not remove input in bash

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Aug 13 09:38:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86921

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If you're saying that data read from the terminal by std::cin cannot be
"un-read" by typing backspace, that's correct. That is not a GCC bug, it's just
how the OS works.

In the default line-buffered mode, when you hit Enter the line is sent to the
application. Typing backspace cannot undo that, the program has already read
the data, and doesn't receive the backspace characters.


More information about the Gcc-bugs mailing list