Valhalla Legends Archive

Programming => General Programming => C/C++ Programming => Topic started by: drivehappy on December 02, 2003, 10:15 AM

Title: Password mask in console
Post by: drivehappy on December 02, 2003, 10:15 AM
I was wondering how to place a static character ('*')  in place of characters entered at cin. Is it possible to do since you really only have control after cin? Is there anything else that would work?

EDIT: grammer
Title: Re:Password mask in console
Post by: DarkMinion on December 02, 2003, 11:36 AM
Simple: Don't use cin.  Use getc() or the like.
Title: Re:Password mask in console
Post by: iago on December 02, 2003, 12:03 PM
getc() has the same problem
Title: Re:Password mask in console
Post by: Skywing on December 02, 2003, 12:12 PM
One option might be to output "\b*" after each letter entered.  Another option might be to use OS-dependent input routines that don't echo to the console.
Title: I dont knwo fi this is helpful but...
Post by: TheNewOne on December 21, 2003, 11:10 AM
In Visual C++ u right click the edit bar you wanr to be apssworded, then you hit properties.. goto style and click the checkbox where it says password.. hope i could help
Title: Re:I dont knwo fi this is helpful but...
Post by: Skywing on December 21, 2003, 01:09 PM
Quote from: TheNewOne on December 21, 2003, 11:10 AM
In Visual C++ u right click the edit bar you wanr to be apssworded, then you hit properties.. goto style and click the checkbox where it says password.. hope i could help
Note that this topic is about consoles and not edit controls.