strcpy

closed account (10oTURfi)
I have really annoying problem with strcpy.
Whenever I use strcpy(blahblah, "blahblah") I get this warning message:
warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'


And when I use strcpy_s(blahblah, "blahblah") instead...
error C2660: 'strcpy_s' : function does not take 2 arguments


Any ideas?
this function takes 3 args: destination, num_elements, source
strcpy_s(destination, strlen(source), source)
warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.


This is a warning. It still works.
Topic archived. No new replies allowed.