2

Possible Duplicate:
Read a password from std::cin
Replace input with “ * ” C++

I'm looking for the C/C++ comparable way of doing <input type="password" /> for allowing the user to type in their password after a prompt in a command-line tool written in C.

string username;
string password;
cout << "Username: ";
getline(cin, username);
cout << "Password: ";
    [<input type="password" />]
getline(cin, password);
Community
  • 1
  • 1
Velocitas
  • 439
  • 1
  • 4
  • 11
  • 1
    Check out the first answer from [this question](http://stackoverflow.com/questions/1786532/c-command-line-password-input). – Nick S. Dec 03 '12 at 20:38
  • Nick S. - I was hoping for something more platform-agnostic. I also wanted *'s and not echo off. – Velocitas Dec 03 '12 at 21:15

0 Answers0