Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

unknown.exe

macrumors member
Original poster
Sep 22, 2007
67
0
Somewhere on Earth
Sup, I'm writing a C++ program that requires you to input a password before giving the user access to the full program. My question is, how can I replace the input with asteriks while the user is typing, like login screens on computers. I've heard about echo and other things like that, but nobody is being very specific with their answer... I've only been programming C++ for 12 weeks. So can anyone tell me in terms that a 9th grader in a C++ class with an incompetent teacher can understand;)?:apple:
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
First off, you shouldn't make a new thread for this when you already have an existing thread.

Second, when was the last time you saw at the command line your password being replaced with asterisks? AFAIK, passwords entered in the terminal are never shown (e.g. sudo) if using the appropriate calls. Passwords entered in the GUI are replaced with asterisks. This is the standard behavior I've seen, and the answer for doing this has already been given.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.