<b>(a)</b> #include <stdio.h> #include <string.h> #include <strsafe.h> void main() { char str[10]; strcpy(str, "hello"); puts(str); } <b>(b)</b> error C2065: 'strcpy_instead_use_StringCbCopyA_or_StringCchCopyA' : undeclared identifier <b>(c)</b> #undef strcpy #define strcpy strcpy_instead_use_StringCbCopyA_or_StringCchCopyA;
Example 2: Although (a) is valid code, the compiler complains with the message in (b). The header defines (c).