vs. use of scanf error cases and solutions

Source: Internet
Author: User
This article is mainly for everyone in detail introduced the VS2015 use scanf Error resolution method, with a certain reference value, interested in small partners can refer to

The example of this article for everyone to share the VS2015 use scanf error resolution, for your reference, the specific content as follows

1, at the front of the program add:

#define_CRT_SECURE_NO_DEPRECATE

2, at the front of the program add:

#pragma warning (disable:4996)

3, change the scanf to scanf_s;

4. No need to add that line of code at the top of the program, just uncheck "SDL check" when creating a new project;

5, if the project has been established, in the project properties to close the SDL also line; I use the VS is the Chinese version of the

(1), I will "yes" to "no", compile the same code when the following warning, not an error:

(2), if not changed, is an error, not a warning:

6, in the project set up on the line: the error of the macro definition is put to: Project Properties-----A/C + +----preprocessor------preprocessor Definition

7. Add:/D _crt_secure_no_warnings on the project properties----C + +----command line.

"Recommended"

1. asp free Video Tutorial

2. asp Tutorials

3. Eon the ASP Basic video tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.