Invisible login for passwords?

Possible duplicate:
Read the password from std :: cin

I want cin -> input, but when they enter something, I don't want it to be visible to them. For example, when you use passwd on unix to change your password when it does not show what you typed. I hope this is clear what I ask. Thank you in advance.

+3
source share
5 answers

From C ++ FAQ Lite

++. ++ , . , . , , , .
+6

cin - , () . , .

+2

getpass(3) Unix- , , .

  • ( Unix).
  • ( " SUSv2, LEGACY. POSIX.1-2001." ).

C ++.

+2

- , , linux, C ++. . , C ++ .

+1

. : "A" , ; . (, ).

UNIX, , - . , , .

backspace, , , , , backspace.

, , , , .

, , .

0

Source: https://habr.com/ru/post/1762364/


All Articles