当前位置:网站首页>In VS_ In 2019, scanf and other functions are used to prompt the error of unsafe functions
In VS_ In 2019, scanf and other functions are used to prompt the error of unsafe functions
2022-07-03 22:30:00 【Camellia Populus】
stay VS_2019 Use in scanf Wait for the function to prompt the problem of unsafe function error
- stay VS Call in scanf、sprintf、strcpy、strcat When waiting for a function, you will often be prompted that the function is unsafe , It is recommended to use _s Safer function warnings
- as a result of Visual studio C++ Not really C++, But through Microsoft Company optimized
- Maybe those development engineers at Microsoft think these C There is no boundary check for memory inside the function , It is very likely to cause problems such as memory out of bounds , So an unsafe warning is set
Method 1 , Add a line of declaration at the beginning of the code
For shielding scanf() Error of equal function , Add the following code to the code , Put it on the top of the file !
#define _CRT_SECURE_NO_WARNINGS
Method 2 , Modify the properties of the file
- stay vs in , Right click to select the project name -> attribute -> C/C++ -> The preprocessor -> Preprocessor definition -> Add... To edit _CRT_SECURE_NO_WARNINGS This predefined .


边栏推荐
- User login function: simple but difficult
- 2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
- Report on the current situation and development trend of ethoxylated sodium alkyl sulfate industry in the world and China Ⓞ 2022 ~ 2027
- Data consistency between redis and database
- 油猴插件
- Analysis report on the development trend and Prospect of global and Chinese supercontinuum laser source industry Ⓚ 2022 ~ 2027
- The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
- C3p0 connection MySQL 8.0.11 configuration problem
- Cesium terrain clipping draw polygon clipping
- Buuctf, misc: n solutions
猜你喜欢

Pan Yueming helps Germany's Rochester Zodiac custom wristwatch

2022 electrician (elementary) examination questions and electrician (elementary) registration examination

Cesium terrain clipping draw polygon clipping

webAssembly

How to solve the problem of requiring a password when accessing your network neighborhood on your computer

STM32 multi serial port implementation of printf -- Based on cubemx

Blue Bridge Cup -- Mason prime

The overseas listing of Shangmei group received feedback, and brands such as Han Shu and Yiye have been notified for many times and received attention
![[dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)](/img/6c/2d48d441fee1981a271319fd9f6c23.jpg)
[dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)

Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
随机推荐
Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
Summary of basic knowledge of exception handling
Take you to master the formatter of visual studio code
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)
How to solve the problem of requiring a password when accessing your network neighborhood on your computer
This time, thoroughly understand bidirectional data binding 01
The 14th five year plan and investment feasibility study report of China's industry university research cooperation Ⓧ 2022 ~ 2028
Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
On my first day at work, this API timeout optimization put me down!
[sg function]split game (2020 Jiangxi university student programming competition)
js demo 計算本年度還剩下多少天
Report on the development status and investment planning trends of China's data center industry Ⓡ 2022 ~ 2028
The 14th five year plan for the construction of Chinese Enterprise Universities and the feasibility study report on investment Ⓓ 2022 ~ 2028
Summary of fluent systemchrome
Uboot migration
Pan Yueming helps Germany's Rochester Zodiac custom wristwatch
How to obtain opensea data through opensea JS
Is it safe and reliable to open an account and register for stock speculation? Is there any risk?
BUUCTF,Misc:LSB
Blue Bridge Cup Guoxin Changtian MCU -- program download (III)