How do make a password char

Game Editor comments and discussion.

How do make a password char

Postby tvz » Sat Aug 10, 2013 8:48 am

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
I have not left.
User avatar
tvz
 
Posts: 98
Joined: Sun Mar 10, 2013 7:13 am
Location: Your PC screen
Score: 3 Give a positive score

Re: How do make a password char

Postby MrJolteon » Sat Aug 10, 2013 9:24 am

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.
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: How do make a password char

Postby tvz » Sat Aug 10, 2013 10:24 am

thankyou verymuch :D. Is there any other way using getchar and putchar?
I have not left.
User avatar
tvz
 
Posts: 98
Joined: Sun Mar 10, 2013 7:13 am
Location: Your PC screen
Score: 3 Give a positive score

Re: How do make a password char

Postby skydereign » Sat Aug 10, 2013 6:39 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest