vs2012 error c4996: 'fopen': This function or variable may be unsafe
【原文:http://blog.csdn.net/zhangyuehuan/article/details/12012635】
做數字影象處理作業,使用vs2012,遇到如下錯誤。
1>------ 已啟動生成: 專案: 20130925, 配置: Debug Win32 ------
1> stdafx.cpp
1>d:\code\20130925\20130925\stdafx.cpp(18): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\vs2012\vc\include\stdio.h(218) : 參見“fopen”的宣告
1> 20130925.cpp
1> 正在生成程式碼...
========== 生成: 成功 0 個,失敗 1 個,最新 0 個,跳過 0 個 ==========
解決方案,專案 =》屬性 =》c/c++ =》前處理器=》點選前處理器定義,編輯,加入_CRT_SECURE_NO_WARNINGS,即可。
相關文章
- error C4996: 'scanf': This function or variable may be unsafe.Error996Function
- 使用Boost庫報error C4996錯誤Error996
- ORA-07391: sftopn: fopen error, 目錄許可權問題Error
- E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packagesErrorPackage
- nginx upload 模組build錯誤解決error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]NginxUIError
- DBMS_UTILITY.FORMAT_ERROR_BACKTRACE FunctionORMErrorFunction
- error: ‘PATH_MAX’ undeclared (first use in this function)ErrorFunction
- error: use of deleted function ‘YYSTYPE::YYSTYPE()’[解決]ErrordeleteFunction
- Q:[Vue warn]: Duplicate keys detected: ‘PAYACT‘. This may cause an update error.VueError
- [Javascript] Access private variable inside IIFE and mutate this through Object.prototype getter functionJavaScriptIDEObjectFunction
- ERROR 1193: Unknown system variable 'log_slow_queries'Error
- Discuz雲平臺站點資訊同步失敗,An unknown error occurred. May be DNS Error.ErrorDNS
- cornerstone the server may be unreachable or the url may be incorrectServer
- serverless Error: getaddrinfo ENOTFOUND Function.doRequestServerErrorFunction
- c語言字串處理報錯 warning,C4996,sprintf,deprecated,C4996,strcpy,C4996,strcatC語言字串996
- vue報錯之Duplicate keys detected: '0'. This may cause an update error.VueError
- ORA-15186: ASMLIB error function = [asm_open], error = [1]ASMErrorFunction
- error LNK2026 module unsafe for SAFESEH imageError
- variable: Type 與 Type variable
- "Fatal error: Call to undefined function: file_put_contents()"ErrorUndefinedFunction
- [HP-UX] ERROR: Function activate_volume_groupUXErrorFunction
- Unsafe
- c fopen檔案讀寫
- 【MySQL】ERROR 1418 This function has none of DETERMINISTIC, NO SQL, ...MySqlErrorFunctionNone
- 解決報錯 cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.DNNErrorAPP
- 因login-path導致MySQL 啟動[ERROR]unknown variable 'password=*****'MySqlError
- global_variable VS local_variable &functionalFunction
- PSQLException: ERROR: failed to find conversion function from unknown to charSQLExceptionErrorAIFunction
- R12 help--diagnostics--examine gives function not available errorFunctionAIError
- C中的open(), write(), close(), fopen()
- Go unsafe包Go
- __unsafe_unretainedAI
- ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL,ErrorFunctionNoneSQL
- APP-OFA-48400: Error: function faxbmt returned failure 的處理APPErrorFunctionAI
- Error: Expected ref to be a function, a string, an object returned by React.createRef(), or null.ErrorFunctionObjectReactNull
- 解決ERROR 1231 (42000): Variable 'time_zone' can'tError
- javascript 中function(){},new function(),new Function(),Function 摘錄JavaScriptFunction
- Oracle environment variableOracle