vs2015中编写C语言代码出现错误:提示scanf is not safe 问题解决办法
2016-09-21 21:29
1011 查看
在vs2015中,运行出现错误:
严重性 代码
说明 项目 文件
行 禁止显示状态
错误 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.
ConsoleApplication13 e:\vslianlian\consoleapplication13\consoleapplication13\consoleapplication13.cpp
152
解决办法:在stdfax.h中如下方添加一行定义:
#pragma once
#define _CRT_SECURE_NO_DEPRECATE
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: 在此处引用程序需要的其他头文件
严重性 代码
说明 项目 文件
行 禁止显示状态
错误 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.
ConsoleApplication13 e:\vslianlian\consoleapplication13\consoleapplication13\consoleapplication13.cpp
152
解决办法:在stdfax.h中如下方添加一行定义:
#pragma once
#define _CRT_SECURE_NO_DEPRECATE
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: 在此处引用程序需要的其他头文件
相关文章推荐
- IDEA编译时候出现问题:代码不提示错误,编译时出错解决办法
- 打开sln文件出现 “the selected file is not a valid visual studio solution file”错误提示解决办法
- 打开sln文件出现the selected file is not a valid visual studio solution file错误提示解决办法
- arning: date(): It is not safe to rely on the......错误的解决办法
- Office 2010 激活提示网络连接错误,错误代码0*80072F8F(及其他问题)的解决办法
- 使用AlertDialog.Builder的时候出现错误:unable to add window --token null is not for an application的解决办法
- Android打包提示xxx is not translated in yyy问题解决办法
- VS代码提示不出现或者提示变成英文或者各种奇葩问题的解决
- VS2013 调试时出现“表达式计算器中发生内部错误”的问题解决办法
- Mac 安装 Genymotion 下载虚拟机出现 The file is corrupt 提示问题解决办法
- VS2015和QT5.5项目出现的诡异错误(LNK2001和LNK09)的解决办法
- win7中IIS7.0 调试出现错误 The IIS worker process for the launched URL is not currently running的解决办法
- Win7/Win8中注册控件失败,提示“DllRegisterServer的调用失败,错误代码为0x******** ” 问题的解决办法
- git 出现The current branch is not configured for pull No value for key branch.master.merge found in configuration错误的解决办法
- vs数据库访问出现Object reference not set to an instance of an object. 错误解决办法
- 解决Qt for Embedded Linux data directory is not owned by user 0h 错误提示 问题
- mysql连接linux系统提示“登录出现1130 is not allowed to connect to this MySql server”问题,解决方法
- mysql4.1以上版本连接时出现Client does not support authentication protocol #1251错误问题解决办法
- newStringUTF出现input is not valid Modified UTF-8错误解决办法
- eclipse 无法启动AVD,出现Starting emulator for AVD '' PANIC: Could not open: 错误提示的解决办法