how to enter a password with asterisks

This is a discussion on how to enter a password with asterisks within the C Programming forums, part of the General Programming Boards category; Hi everyone, I need help with displaying a password string entered by the user in asterisks*. for example: my version ...

  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, 09: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: 03-31-2003, 11:23 PM
  5. terminate 0 - PLEASE HELP
    By Unregistered in forum C Programming
    Replies: 11
    Last Post: 11-21-2001, 06:30 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21