Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Assign, strcpy and memcpy in C++ are used to distinguish string copies.
Assign, strcpy and memcpy in C++ are used to distinguish string copies.
Assign is a copy of the string string in stl.

Strcpy, when copying, the terminator \0 will be copied together.

Memcpy is a memory copy. The terminator \0 will not be copied when copying, so it must be initialized when using memcpy, and the length needs to be specified when copying memcpy.