Page 1 of 1

How do make a password char

PostPosted: Sat Aug 10, 2013 8:48 am
by tvz
Hi everyone, I am very much new to programming and also i am only 15. I have made a login window where user can enter his name and password and both are stored in text file but i want the password to be entered as *.And then (typed password) stored in a file. and when we login, the program read the name and password and shows the password as * in the password textbox. I know there are a lot of good programmers so please can anyone help me

Re: How do make a password char

PostPosted: Sat Aug 10, 2013 9:24 am
by MrJolteon
tvz wrote:Hi everyone, I am very much new to programming and also i am only 15. I have made a login window where user can enter his name and password and both are stored in text file but i want the password to be entered as *.And then (typed password) stored in a file. and when we login, the program read the name and password and shows the password as * in the password textbox. I know there are a lot of good programmers so please can anyone help me

Just use an image font where every character is an asterisk.

Re: How do make a password char

PostPosted: Sat Aug 10, 2013 10:24 am
by tvz
thankyou verymuch :D. Is there any other way using getchar and putchar?

Re: How do make a password char

PostPosted: Sat Aug 10, 2013 6:39 pm
by skydereign
The way MrJolteon explained is simply a method of hiding the actual text. Another way to do that is to put an asterisk instead of the new character they type (but store the correct value in the string). As for actually reading and writing the file, you'll need to learn how file pointers work. I suggest using fwrite and fread.