T
torno
Hi,
Can someone guide me as to how I can modify the code below to hide
characters from displaying on the screen as they are entered? If there is
a better way of achieving this, please let me know.
I'm running this on unix (Solaris8).
thanks.
#include <stdio.h>
int main(void)
{
int passwdstr;
printf ( "Enter password: ");
while ( ( passwdstr=getchar() ) != '\r' ) {
putchar ('*');
}
return 0;
}
Can someone guide me as to how I can modify the code below to hide
characters from displaying on the screen as they are entered? If there is
a better way of achieving this, please let me know.
I'm running this on unix (Solaris8).
thanks.
#include <stdio.h>
int main(void)
{
int passwdstr;
printf ( "Enter password: ");
while ( ( passwdstr=getchar() ) != '\r' ) {
putchar ('*');
}
return 0;
}