Computer Science Canada Need help with password |
Author: | KONjbnj [ Wed Apr 27, 2005 8:12 am ] |
Post subject: | Need help with password |
I need to create a program that when i need to get something from the user it puts it in asterisks like a password (like when you log into hotmail) Thanks KonjBnj |
Author: | mksound [ Wed Apr 27, 2005 8:41 am ] |
Post subject: | re |
hmm............... figure it out..... |
Author: | jamonathin [ Wed Apr 27, 2005 9:01 am ] |
Post subject: | |
You need to var something : string := "" (equal to nothing) then you need to var something_else: string (1) Now you need to use getch, and whenever the user inputs a letter, clear last screen, and add the input to something. Then use a for loop that uses the length of something, and have it display "*" or whatever for how many times it goes through that for loop. And just have the program exit when enter is elsected or something. ** The program must be looped ** mksound wrote: hmm............... figure it out.....
Those are words spoken of someone who doesn't know the answer himself. |
Author: | KONjbnj [ Wed Apr 27, 2005 1:36 pm ] |
Post subject: | |
Ok that makes sense just that im still a noob at turing and dont know things like getch so can you plz show the source code or part of it Thanks KonjBnj |
Author: | jamonathin [ Wed Apr 27, 2005 1:40 pm ] | ||
Post subject: | |||
Here's a tip.
Look up getch to see what type of variable you need, and remember that thing stores hold. *** Hit F10 *** |
Author: | KONjbnj [ Wed Apr 27, 2005 1:45 pm ] |
Post subject: | |
I still dont get it that much plz help |
Author: | jamonathin [ Wed Apr 27, 2005 1:51 pm ] | ||
Post subject: | |||
You're not gettin any more source code after this. Look up the vars and whatnot, and when you go to replace the letters, use a for loop like this.
Reason you want to display however many letters there are in the password with *'s. The reason I'm not giving you any mre source code, is because there isn't much left, and this sounds like an assignment for school. |
Author: | Bacchus [ Wed Apr 27, 2005 6:36 pm ] | ||
Post subject: | |||
|
Author: | McKenzie [ Wed Apr 27, 2005 6:50 pm ] | ||
Post subject: | |||
Make sure you set your screen to noecho or you will defeat the purpose:
|
Author: | mike200015 [ Wed Apr 27, 2005 8:45 pm ] |
Post subject: | |
wat does noecho do?? |
Author: | Bacchus [ Wed Apr 27, 2005 8:55 pm ] |
Post subject: | |
if u use getch or get then it wont put the letters on the screen when you press the key |
Author: | mike200015 [ Wed Apr 27, 2005 11:20 pm ] |
Post subject: | |
with getch, it doesn't put the letters on the screen anyway |