vs2022报错
- ‘strcpy’: This function or variable may be unsafe. Consider using strcpy s instead. To disable deprecation, USe CRT SECURE NO WARNINGS.See online help for details.
- ‘strcat’: This function or variable may be unsafe. Consider using strcpy s instead. To disable deprecation, USe CRT SECURE NO WARNINGS.See online help for details.

解决方法
在include前面加上宏定义:
#define _CRT_SECURE_NO_WARNINGS

文章讨论了VisualStudio2022中关于strcpy和strcat函数的安全警告,建议使用_strcpy替代以消除警告,同时给出了禁用警告的宏定义_CRT_SECURE_NO_WARNINGS的解决方案。

2万+

被折叠的 条评论
为什么被折叠?



