VS2013运行报错error C4996: 'scanf': This function or variable may be unsafe.
生活随笔
收集整理的這篇文章主要介紹了
VS2013运行报错error C4996: 'scanf': This function or variable may be unsafe.
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
報錯內容:
1>------ Build started: Project: 約瑟夫問題, Configuration: Debug Win32 ------ 1> 約瑟夫問題.cpp 1>c:\users\xuchunyan\documents\visual studio 2013\projects\約瑟夫問題.cpp(11): error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> d:\program files\visual studio\vc\include\stdio.h(283) : see declaration of 'scanf' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========解決方法
在文件第一行(注意一定是第一行)加上一句:
#define _CRT_SECURE_NO_DEPRECATE總結
以上是生活随笔為你收集整理的VS2013运行报错error C4996: 'scanf': This function or variable may be unsafe.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 大数据之Elasticsearch教程
- 下一篇: vgh电压高了有什么_一文告诉你电压互感