Display input(password) as asterisk(*)

This is a discussion on Display input(password) as asterisk(*) within the C++ Programming forums, part of the General Programming Boards category; nevermind...

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    2

    Display input(password) as asterisk(*)

    nevermind
    Last edited by seePLUSPLUSn00b; 09-29-2008 at 02:00 PM.

  2. #2
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    No real standard way to do it but include <conio.h> and use getch() in a while loop. Getch reads the keyboard input in a character-by-character method.

  3. #3
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,810
    Quote Originally Posted by seePLUSPLUSn00b View Post
    Can anyone help me by writing a code that would do this and an explanation for what each part of the code does/means? I need to be able to explain how to do it or how it works.
    Now they want us to do the work and explain how it works for them. The laziness meter is off the charts.
    Woop?

  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    2
    Quote Originally Posted by prog-bman View Post
    Now they want us to do the work and explain how it works for them. The laziness meter is off the charts.
    Well I said any help is greatly appreciated. If you can write the code or direct me to it or explain how to do this that would help.
    So if you can do either of those things that would be great.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,159
    The problem is that, as twomers noted, the standard library facilities provide no way of doing what you want to do. <iomanip> will be of no use here. Consequently, your best bet with something simple is the non-standard getch() from the non-standard <conio.h> header.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    This has also been solved loads of times here, so search the forums and you'll find something.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. display character size...(quite urgent..)
    By karthi in forum C Programming
    Replies: 10
    Last Post: 07-11-2007, 10:42 PM
  2. new problem with class
    By jrb47 in forum C++ Programming
    Replies: 0
    Last Post: 12-01-2006, 08:39 AM
  3. about scan 7-segment display via parallel port
    By mobdawg in forum C Programming
    Replies: 4
    Last Post: 09-11-2002, 07:11 AM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM
  5. Printf to display chars
    By CodeMonkey in forum C++ Programming
    Replies: 4
    Last Post: 03-14-2002, 05:01 PM

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