Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to display *'s when a user entesr a password. 1

Status
Not open for further replies.

airdevil

Programmer
Oct 31, 1999
10
US
Hello, thanx for your help.<br>
<br>
I need to display stars while the user is entering character<br>
at a password screen. Can someone post an example or give me some commands that i can fool around with. Thanx.<br>
<br>
Korn<br>

 
You might want to look at the getchar and putchar functions. Your program might look something like this:<br>
<br>
#include &lt;stdio.h&gt;<br>
<br>
int main(void)<br>
{<br>
int letter;<br>
while ((letter = getchar()) != '/n')<br>
{<br>
putchar('*');<br>
/* concatenate the letter into the password */<br>
}<br>
return 0;<br>
}<br>
<br>
I haven't compiled this to see if it works but you get the general idea.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top