concealing password input

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?
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
I would suggest ncurses if you want to do that kind of fancy text manipulation.
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.