By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,902 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,902 IT Pros & Developers. It's quick & easy.

how to simulate the passwoed '*'

momotaro
100+
P: 357
I want to write a small piece of code that Simulate the password I mean whene I type my words they apeare :"*******"....

thank you in advence!
May 24 '07 #1
Share this Question
Share on Google+
6 Replies


Ganon11
Expert 2.5K+
P: 3,652
This thread belongs in the Forums, not the Articles. Please read the Sticky in the Articles section regarding this rule.
May 24 '07 #2

P: 79
Well, you can let the user enter the password, which would be stored in a string. Then you can get the size of the string, and output '*' as many times as required. Yuo can use a for loop to do this if you want it to use more basic coding.

This should get you started for now. See what you can come up with.
May 24 '07 #3

Savage
Expert 100+
P: 1,764
I want to write a small piece of code that Simulate the password I mean whene I type my words they apeare :"*******"....

thank you in advence!
What have u tryed so far?

Please be a little bit descriptive and post by following the rules of posting guidelines.

:)

Savage
May 24 '07 #4

Savage
Expert 100+
P: 1,764
Well, you can let the user enter the password, which would be stored in a string. Then you can get the size of the string, and output '*' as many times as required. Yuo can use a for loop to do this if you want it to use more basic coding.

This should get you started for now. See what you can come up with.
Sorry,but this is not the good idea.

OP needs to create a while loop and get char by char with no echoing to the stdout,after inputing one char in the loop,u need to check wheter that char is not a enter.If it is a enter don't add it to ur array and break from loop else add
it to array and print out a * on the stdout.

Savage
May 24 '07 #5

momotaro
100+
P: 357
Thank you guys for the help
May 28 '07 #6

Savage
Expert 100+
P: 1,764
Thank you guys for the help
We are more than happy to help u.


:D

Savage
May 28 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.