问题:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C4996 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _getch. See online help for details.
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C4996 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _getch. See online help for details.
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C4996 'kbhit': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _kbhit. See online help for details.
解决方法:
法一:
在属性-->C/C++-->预处理器-->预处理定义添加
_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_DEPRECATE
法二:
将getch改为_getch
将kbhit改为_kbhit