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.