文章目录
一. 库函数strcpy()
参考文档:strcpy - C++ Reference (cplusplus.com)
char * strcpy ( char * destination, const char * source );
函数描述:拷贝字符串。
将source指向的C字符串复制到destination指向的数组中,包括结束的null字符(并在该点停止)。
为了避免溢出,destination指向的数组的大小应该足够长,以包含与source相同的C字符串(包括结束的null字符),并且不应该在内存中与source重叠。
函数参数:
- destination:指向要在其中复制内容的目标数组的指针。
- source:要复制的C字符串。
函数返回:目的内存的地址。