![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
How to hide characters from being displayed on screen as they are keyed in?Hi,
In C programming,how can you hide the characters from being displayed on screen while they are being keyed in?For e.g Keying in passwords. Thanks, |
|
#2
|
||||
|
||||
|
Quote:
__________________
Age is unimportant -- except in cheese |
|
#3
|
|||
|
|||
|
Hello waltp,
I use GNU C complier (gcc) on linux. Thanks, |
|
#4
|
|||
|
|||
|
Hi Waltp,
I got a solution for my problem.I used getpass() function on linux platform as mentioned below. CPP / C++ / C Code:
It stores password in pass and does not display anything on screen. Thanks, |
|
#5
|
||||
|
||||
|
As a cheap method you could probally "jury-rig" it with a system clear command after every key is typed.
__________________
"To argue with a person who has renounced the use of reason is like administering medicine to the dead." -Thomas Paine www.sullivan-county.com/deism.htm |
|
#6
|
||||
|
||||
|
EDIT by dsmith
The preceeding post was split as a seperate thread to the C++ Tutorials forum. Please click here to go to this thread. END EDIT Quote:
I'm sure it's not copyrighted not proprietary. It's a standard way to implement getch() on *nix. When I was on a Unix system, I remember digging around and made an almost identical function. Moderators: This code would be a great addition to the tutorial section... hint, hint __________________
Age is unimportant -- except in cheese Last edited by dsmith : 10-Aug-2004 at 12:24.
Reason: Split out post for a tutorial entry
|
|
#7
|
|||
|
|||
|
This is handy. Good idea WaltP, thread moved.
GF |
|
#8
|
||||
|
||||
|
Quote:
__________________
Age is unimportant -- except in cheese |
|
#9
|
||||
|
||||
|
And that's my fault, I was discussing your comment with dsmith in private when it should have been discussed in the MODERATOR forums. Garth wasn't aware that dsmith was going to be 'handling' the thread. Dsmith will follow up on this as soon as he has the time... Once again, I apologise for delaying the 'splitting' of this thread.
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Python ebook by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] How to hide e-mail address from SPAM Bots | BobbyDouglas | Web Design Forum | 40 | 13-Feb-2006 09:44 |
| nvidia fx5200 128mb black screen!! | cpu-loser | Computer Hardware Forum | 32 | 21-Jul-2004 18:28 |
| send pc image to tv screen?! | Hood | Computer Hardware Forum | 5 | 05-May-2004 11:51 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The