Password replace with * on entry

This is a discussion on Password replace with * on entry within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm trying to write a code that on cin of a password it must not show the exact password ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    Password replace with * on entry

    Hi,
    I'm trying to write a code that on cin of a password it must not show the exact password but type the symbol *..

    I'm trying to look for a function that can replace the entry on input with a symbol *

    please help

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    Not possible with standard C++. This has been asked million times already. Use the search function.

  3. #3
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85
    You can use getchar() to that effect though

    http://www.cplusplus.com/reference/c...o/getchar.html

    Using the example code from that website, before the line
    Code:
    putchar (c);
    put
    Code:
    c = '*';

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    This question seems vaguely familiar... Perhaps if there were some means by which to traverse the forums to possibly find a question that may have been previously asked...

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Last edited by EVOEx; 11-13-2008 at 04:12 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Input a password and replace with *s
    By Abda92 in forum C Programming
    Replies: 45
    Last Post: 10-06-2007, 04:52 PM
  2. [Q]Hide Password
    By Yuri in forum C++ Programming
    Replies: 14
    Last Post: 03-02-2006, 03:42 AM
  3. Replace a list with a new entry?
    By niponki in forum C Programming
    Replies: 4
    Last Post: 08-17-2005, 11:41 AM
  4. Binary Search Tree
    By penance in forum C Programming
    Replies: 4
    Last Post: 08-05-2005, 06:35 PM
  5. written command line password generator
    By lepricaun in forum C Programming
    Replies: 15
    Last Post: 08-17-2004, 09:42 PM

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