Home > Back-end >  The C language
The C language

Time:10-06

I meet a problem, as shown in figure 1, the application, use VS2019 prompts warning, and unable to run, as shown in figure 2, but the use of vc + + 6.0 can run normally, as shown in figure 3, this is the scanf/scanf_s statements of pot or pan goto statements? Pan or the compiler itself? This how to solve it?

CodePudding user response:

Parameter is not enough, check what you need parameters

CodePudding user response:

Scanf_s % c will indicate the size
The scanf need to add # define _CRT_SECURE_NO_WARNINGS
Or turn off the SDL check in engineering properties

CodePudding user response:

reference 1st floor akari10032 response:
parameter is not enough, check what kind of parameter

Hope fine speak?? And I don't know??

CodePudding user response:

refer to the second floor m0_46108109 response:
scanf_s % c will indicate the size
The scanf need to add # define _CRT_SECURE_NO_WARNINGS
Or in the engineering properties of the SDL check off

Looks fine, don't understand??????

CodePudding user response:

reference roe, 4/f, the bow response:
Quote: refer to the second floor m0_46108109 response:
scanf_s % c will indicate the size
The scanf need to add # define _CRT_SECURE_NO_WARNINGS
Or in the engineering properties of the SDL check off

Looks fine, don't understand??

Advice is the somebody else say you thoughts
Scanf_s the function prototype why security which he specifies the length of the to read, you didn't give the parameters, and how to speak,

CodePudding user response:

I don't know why, % c will indicate the width,
SDL seemed to allow some of the original content, the new version of the vs considered unsafe, may even turn off to warn,

When you really start programming, there will be a lot of you first met function, it not only need to look at the document, will also have to guess is stem what of,
Now see all don't know where to where, stick to it will be clear,
  • Related