C++ 在C/C+中键入密码时如何显示*+;命令行工具?
可能重复:C++ 在C/C+中键入密码时如何显示*+;命令行工具?,c++,passwords,getline,cin,command-line-tool,C++,Passwords,Getline,Cin,Command Line Tool,可能重复: 我正在寻找C/C++类似的方法,允许用户在用C编写的命令行工具中出现提示后键入密码 string username; string password; cout << "Username: "; getline(cin, username); cout << "Password: "; [<input type="password" />] getline(cin, password); 字符串用户名; 字符串密码; 无法查看.Nic
我正在寻找C/C++类似的方法,允许用户在用C编写的命令行工具中出现提示后键入密码
string username;
string password;
cout << "Username: ";
getline(cin, username);
cout << "Password: ";
[<input type="password" />]
getline(cin, password);
字符串用户名;
字符串密码;
无法查看.Nick S.的第一个答案-我希望有更多平台不可知论的东西。我还想要*而不是呼应。