错误提示:

error C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.

原因:

新版本的vs对旧有的函数itoa进行了安全检查,所以使用新版本的vs会提示错误,而旧版本的没问题。

解决办法:

1、使用新函数 _itoa

2、如果非要使用旧函数也是可以的,加上宏定义即可(项目   --->  XX属性页  ---> C/C++  ---> 预处理器 )

 

#define _CRT_NONSTDC_NO_DEPRECATE
#define _CRT_SECURE_NO_WARNINGS

error C4996: 'itoa': The POSIX name for this item is deprecated

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2021-08-15
  • 2022-12-23
  • 2021-06-09
  • 2021-07-25
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-07-01
  • 2022-12-23
相关资源
相似解决方案