Hide user input on password prompt [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Read a password from std::cin I don't work normally with the console, so my question is maybe very easy to answer or impossible to do . Is it possible to "decouple" cin and cout , so that what I type into the console doesn't appear directly in it again? I need this for letting the user typing a password and neither me nor the user normally wants his password appearing in plaintext on the screen. I tried using