I downloaded a code in C ++ from the internet and when I open the solution, it gives the following error:
Error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
Following the statement, I modified the strcpy
by strcpy_s
. But it generated 2 other errors:
Error C2660 'strcpy_s': function does not get 2 arguments.
Error (active) E0304 no overloaded function instance "strcpy_s" matches the list of arguments.
Why did the first error occur? What am I doing wrong?
Code:
strcpy((char*)m_pOriginalCVar->pszName, m_szDummyName);