解决Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.

1、打开项目属性

解决Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS._第1张图片

2、配置属性 --> C/C++ --> 命令行

其他选项,添加:

/D _CRT_SECURE_NO_WARNINGS 

保存退出即可
解决Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS._第2张图片

你可能感兴趣的:(visualstudio,c++)