concealing password input

Aug 5, 2010 at 8:15am
how do I replace each character the user types as a '*' instead of displaying it on the console in a PLATFORM INDEPENDENT way? Is there a way to do it with the standard libraries?
Aug 5, 2010 at 8:26am
You might be able to get a single character, and cout << "\b*" (\b is for backspace)
Its not really very good solution, but i cant think of anything else.
Last edited on Aug 5, 2010 at 8:26am
Aug 5, 2010 at 8:32am
I would suggest ncurses if you want to do that kind of fancy text manipulation.
Aug 5, 2010 at 8:32am
Aug 12, 2010 at 5:55am
hey the man pages state that the getpass function is obsolete, is there a newer way to do it?
Topic archived. No new replies allowed.