strcpy [C++ Reference]
Keywords: c,string,strcpy
Date: 2009-03-13T02:27:44-0700

## strcpy

Syntax:

        #include <cstring>
        char *strcpy( char *dest, const char *src );

The strcpy() function copies characters in the string src to the string dest, including the null termination. The return value is dest. Note that strcpy() does not perform bounds checking, and thus risks overrunning from or to. For a similar (and safer) function that includes bounds checking, see strncpy().

Related Topics: memcpy, strcat, strchr, strcmp, strncmp, strncpy

Another set of related (but non-standard) functions are strlcpy and strlcat.