实现Strcpy(字符串拷贝)

字符串拷贝(不考虑内存重叠) char* myStrcpy(char* destStr,const char* str) { //字符串有有效性检查,assert断言返回false则停止程序运行 assert(destStr != NULL || str != NULL); char* temp = destStr; //while((*destStr++ = *str++) !='\0'
相关文章
相关标签/搜索