#include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; cout << str << endl; return 0; }
프로그램을 실행시키고 나서 백스페이스를 누르면 왜 "^H"라고 써지나요? (Ctrl-Backspace 를 누르면 그냥 앞 문자가 지워지네요...)
tty 설정에서 DEL키(ascii 127번. 혹은 Ctrl-?)가 erase로 설정되어 있는거죠.
shell prompt에서 stty -a 라고 쳐 보세요.
tty 설정에서 DEL키(ascii 127번. 혹은 Ctrl-?)가 er
tty 설정에서 DEL키(ascii 127번. 혹은 Ctrl-?)가 erase로 설정되어 있는거죠.
shell prompt에서 stty -a 라고 쳐 보세요.