wrote:
> Hi All,
>
> I need a function that when user types a password in the console, the
> password should be invisible (e.g. display nothing or display "*"
> instead). Just as you can see when you login a machine.
>
> How to implement this? Thanks!
> Note: user is typing passord in the console.
There is no standard C++ way to do that, because the C++ doesn't define a
console, but rather only an input stream (that may be connected to a
keyboard or not) and some output streams (that may be connected to a
display or not). You will need some platform-specific functions.
Maybe the (n)curses library can help you.