当前位置:网站首页>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 .


边栏推荐
- To rotate 90 degrees clockwise and modify the video format
- Rest参考
- Some 5000+ likes, the development notes of a director of cosmic factory, leaked
- Harbor integrated LDAP authentication
- [golang] leetcode intermediate - alphabetic combination of island number and phone number
- Sow of PMP
- Buuctf, misc: n solutions
- Awk getting started to proficient series - awk quick start
- How to obtain opensea data through opensea JS
- Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
猜你喜欢

Buuctf, misc: sniffed traffic
![Buuctf, web:[geek challenge 2019] buyflag](/img/02/d3add04f8145621bff35d46b82ba53.jpg)
Buuctf, web:[geek challenge 2019] buyflag

2022 safety officer-b certificate examination summary and safety officer-b certificate simulation test questions

Awk getting started to proficient series - awk quick start

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

Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
![[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)](/img/b8/e2a59772d009b6ee262fb4807f2cd2.jpg)
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)

Morning flowers and evening flowers

1068. Consolidation of ring stones (ring, interval DP)
![[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)
随机推荐
Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
Common problems in multi-threaded learning (I) ArrayList under high concurrency and weird hasmap under concurrency
Yyds dry goods inventory Spring Festival "make" your own fireworks
regular expression
To rotate 90 degrees clockwise and modify the video format
Preliminary analysis of smart microwave radar module
[Android reverse] use DB browser to view and modify SQLite database (download DB browser installation package | install DB browser tool)
(POJ - 2912) rochambau (weighted concurrent search + enumeration)
How can enterprises and developers take advantage of the explosion of cloud native landing?
Buuctf, misc: n solutions
Shell script three swordsman awk
Teach you how to run two or more MySQL databases at the same time in one system
The 14th five year plan for the construction of Chinese Enterprise Universities and the feasibility study report on investment Ⓓ 2022 ~ 2028
Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)
2 spark environment setup local
Yyds dry goods inventory hands-on teach you to create a jigsaw puzzle using the canvasapi
Programming language (2)
On my first day at work, this API timeout optimization put me down!
Opengauss database log management guide
[template summary] - binary search tree BST - Basics