Thread: how to enter a password with asterisks

  1. #1
    Unregistered
    Guest

    how to enter a password with asterisks

    Hi everyone,

    I need help with displaying a password string entered by the user in asterisks*.

    for example:

    my version is this...

    Enter password: gsdfsa

    however, I want it to look like this...

    Enter password:******

    PLEASE HELP!!

  2. #2
    Sayeh
    Guest
    Use a keyboard input routine that doesn't echo characters to the screen. Then when a key is pressed, echo and asterisk. Watch for the following characters:

    <TAB>
    <BKSPC>
    <RTRN>

    Tab is 0x09 - aka CTRL-I
    Backspace is 0x08 - aka CTRL-H
    Return is 0x0D - aka CTRL-M

    enjoy.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help With a BlackJack Program in C
    By Jp2009 in forum C Programming
    Replies: 15
    Last Post: 03-30-2009, 10:06 AM
  2. Replies: 2
    Last Post: 01-07-2009, 10:35 AM
  3. Enter password, hide by "*".
    By toysoldier in forum C++ Programming
    Replies: 28
    Last Post: 08-15-2004, 08:13 AM
  4. hi need help with credit limit program
    By vaio256 in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2003, 12:23 AM
  5. terminate 0 - PLEASE HELP
    By Unregistered in forum C Programming
    Replies: 11
    Last Post: 11-21-2001, 07:30 AM