Home > Back-end >  Seek help from a great god
Seek help from a great god

Time:06-08

Why the Dev. C + + can run this, I don't see why VS2017
Seek a great god advice

CodePudding user response:

Using scanf_s instead of the scanf good ~ VS2017 don't support the scanf, but using scanf_s security function

CodePudding user response:

reference 1/f, confident boy reply:
using scanf_s instead of the scanf good ~ VS2017 don't support the scanf, but with the safety function scanf_s

The scanf in VS2017 is considered unsafe?

CodePudding user response:

refer to the second floor Dearliao response:
Quote: reference 1/f, confident boy reply:
using scanf_s instead of the scanf good ~ VS2017 don't support the scanf, but with the safety function scanf_s

The scanf in VS2017 is considered unsafe?

For, such as using the scanf enter a "123456" to the char [2], the scanf will cross cover, so using scanf_s instead of, have a length of control parameters, the other can also be VS SDL to check off, you can use the scanf

CodePudding user response:

reference Italink reply: 3/f
Quote: refer to the second floor Dearliao response:

Quote: 1 reference building self-confidence boy reply:
using scanf_s instead of the scanf good ~ VS2017 don't support the scanf, but with the safety function scanf_s

The scanf in VS2017 is considered unsafe?

For, such as using the scanf enter a "123456" to the char [2], the scanf will cross cover, so using scanf_s instead of, have a length of control parameters, the other can also be VS SDL to check off, can use the scanf

Thank god's help, I go to the operation

CodePudding user response:

Is not only the scanf, like sprintf, memcpy these functions will be considered to be unsafe, so the introduction of the sprintf_s, memcpy_s function like this, of course you can choose to not safe to ignore this error and in the code plus the # pragma warning (of which: 4996) is also a kind of method to filter out the mistake

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related