hiding a password in C

January 6, 2011 at 22:32:37
Specs: Windows XP
I want to accept a password from the user but it should not be displayed on the screen while the user is entering.Please give some suggestions.

See More: hiding a password in C

Report •

January 7, 2011 at 10:48:56
There's no standard way of doing that in either c/c++; whatever solution you use will depend on your compiler and target; if this is a Windows console program, getch() from conio.h may suffice if your compiler supports it, or mill over ReadConsoleInput. If it's a Windows Gui, you can use ES_PASSWORD to display the * character. Dunno about other OSes... I don't use them.


Report •

January 7, 2011 at 11:11:35
Maybe this link will help:


Report •

January 10, 2011 at 23:50:34
Thanx for the suggestion!

Report •
Related Solutions

Ask Question