password input

Reply

Join Date: Feb 2007
Posts: 11
Reputation: Mac.Z is an unknown quantity at this point 
Solved Threads: 0
Mac.Z Mac.Z is offline Offline
Newbie Poster

password input

 
0
  #1
Mar 26th, 2007
Hello,

How to read an input(string) from the user keyboard without displaying it on the I/S, but to disply a character that I specify like (*) instead of the actual inputted character.. and if possible to store the entry on array


right now, I can't find any replacement for getch() which is a nonstandard function and doesn't exactly do what I want..
getline() as far as I know can't hide the input..


Thanks
Last edited by Mac.Z; Mar 26th, 2007 at 5:38 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 376
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: password input

 
0
  #2
Mar 26th, 2007
Well done, you've realised there is no standard way to do that.

Your only option is to use a non-standard method, which is of course compiler and or OS dependent. Do you wanna see it?

http://faq.cprogramming.com/cgi-bin/...&id=1043284392
Last edited by iamthwee; Mar 26th, 2007 at 5:37 pm.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 11
Reputation: Mac.Z is an unknown quantity at this point 
Solved Threads: 0
Mac.Z Mac.Z is offline Offline
Newbie Poster

Re: password input

 
0
  #3
Mar 26th, 2007
Thanks for your response,
what's driving me crazy is getch() is being taught at college..it's non-standard and they didn't mention anything about that !
Last edited by Mac.Z; Mar 26th, 2007 at 5:40 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 376
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: password input

 
0
  #4
Mar 26th, 2007
Yeah well there ya go. It probably doesn't matter until you hit the real world. Schools just try to teach the fundamentals, logic etc, and pseudo code.

There are too many pitfalls persistent in c/c++ to catch out the unwary. You only get to know about them with experience.
Last edited by iamthwee; Mar 26th, 2007 at 5:46 pm.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC