Parameters

The strcpy function copies strSource, including the terminating null character, to the location that's specified by strDestination. The behavior of strcpy is undefined if the source and destination strings overlap.

Important

Because strcpy does not check for sufficient space in strDestination before it copies strSource, it is a potential cause of buffer overruns. Therefore, we recommend that you use strcpy_s instead.

wcscpy and _mbscpy are, respectively, wide-character and multibyte-character versions of strcpy. The arguments and return value of wcscpy are wide-character strings; those of _mbscpy are multibyte-character strings. These three functions behave identically otherwise.

In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see Secure Template Overloads.