Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password

Status
Not open for further replies.

jestrada101

Technical User
Mar 28, 2003
332
How can i read in a value with: cin to mask a password that is being typed in?

example:

username: johndoes
password: *****

or even just leaving the password blank?

Thanks!
JE
 
cin itself provides no capability for this.

Look in your C Library's documentation to find out how to control your terminal.

If you use Linux and glibc, here's a link to what you need to use:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top