Hi,
I suggest you could refer to the Doc: Compiler Warning (level 3) C4996
To fix a C4996 issue, we usually recommend you change your code. Use the suggested functions and global variables instead. If you need to use the existing functions or variables for portability reasons, you can turn off the warning.
According to the error message, I suggest you could try to use strcpy_s instead of strcpy.
You could also try to turn off deprecation warnings for these functions in the CRT via define _CRT_SECURE_NO_WARNINGS.
For more details I suggest you could refer to the link: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-160#unsafe-crt-library-functions
Best Regards,
Jeanine
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.