在Visual studio 2019中建立项目,写C++代码后,在代码中使用了scanf,无法成功编译。错误信息如下:
已启动生成…
1>------ 已启动生成: 项目: 数据结构, 配置: Debug Win32 ------
1>SqListProject.cpp
1>D:\CODE\SqList\SqListProject.cpp(17,9): 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:\CODE\SqList\SqListProject.cpp(25,13): 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:\CODE\SqList\SqListProject.cpp(37,13): 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:\CODE\SqList\SqListProject.cpp(49,13): error C4996: 'sca