• Welcome to Valhalla Legends Archive.
 

Password mask in console

Started by drivehappy, December 02, 2003, 10:15 AM

Previous topic - Next topic

drivehappy

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

DarkMinion

Simple: Don't use cin.  Use getc() or the like.

iago

This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Skywing

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.

TheNewOne

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

Skywing

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.