C中的_kbhit和kbhit有什么区别?
whats the difference between _kbhit and kbhit in C?
我知道 kbhit
“确定是否按下键盘键”,但我看到人们交替使用 _kbhit
和 kbhit
。
根据 this page on MSDN - kbhit
已弃用
The Microsoft-specific function name kbhit is a deprecated alias for the _kbhit function. By default, it generates Compiler warning (level 3) C4996. The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported.
We recommend you use _kbhit instead. Or, you can continue to use this function name, and disable the warning. For more information, see Turn off the warning and POSIX function names.
我知道 kbhit
“确定是否按下键盘键”,但我看到人们交替使用 _kbhit
和 kbhit
。
根据 this page on MSDN - kbhit
已弃用
The Microsoft-specific function name kbhit is a deprecated alias for the _kbhit function. By default, it generates Compiler warning (level 3) C4996. The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported.
We recommend you use _kbhit instead. Or, you can continue to use this function name, and disable the warning. For more information, see Turn off the warning and POSIX function names.