报错:出现错误:'sprintf':This function or variable may be unsafe.Consider using sprintf_s instead.To disabl

Here Insert Picture Description
The above error appears in VS: means that the compiler thinks your functions unsafe.
Solution:
Method One: VS calling those with "_s" suffix non-standard functions that follow it with "_s", such as sprintf instead sprintf_s.
Method 2: In the beginning of the file add #define
_CRT_SECURE_NO_DEPRECATE or #pragma
warning (disable: 4996), which is to ignore the warning method (generally less used).

Published 25 original articles · won praise 0 · Views 451

Guess you like

Origin blog.csdn.net/qq_45445740/article/details/103649108