I need a DLL for users can type password and not echo on the screen. So I use _getch()
for getting chars with no echo like this,
//get character with no echo
ch = _getch();
and compile the code use microsoft vs2005.
It works on windows server 2003/2008, but on the new windows server 2012, it echos the characters to the screen.
My problem is why _getch()
echo characters only on windows server 2012? and how to fix it?
使用cin.get()代替getch()。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.