I want to hide the keyboard input in my c program.I want to hide what the user enters so that after entering it's not visible to me but it's still stored in the computer's memory.
I want to hide the keyboard input in my c program.I want to hide what the user enters so that after entering it's not visible to me but it's still stored in the computer's memory.
You didn't say what system you're using, but if you're using *nix, then use the routines in termios.h and disable echoing.
check this simple programit may help you
C Program to mask password text with *. This program is to illustrate how user authentication is made before allowing the user to access the secured resources. It asks for the user name and then the password. The password that you enter will not be displayed, instead that character is replaced by '*'. Read more aboutC Programming Language .http://www.c-program-example.com/2011/09/c-program-for-password-that-you-enter.html
I understand that your intentions are good, but don't recommend code with so many flaws:
- SourceForge.net: Void main - cpwiki
- FAQ > Why gets() is bad / Buffer Overflows - Cprogramming.com
- Avoid scanf() character (same principle is true with printf as well)
- <conio.h> - C++ Forum (instead of conio.h...)