错误提示:

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

相关文章: