实现strcpy函数
已知strcpy函数的原型是
char*strcpy(char *strDest, const char *strSrc);
其中strDest是目的字符串,strSrc是源字符串。
不调用C++/C的字符串库函数,请编写函数 strcpy
strcpy能把strSrc的内容复制到strDest,为什么还要char * 类型的返回值?为了实现链式表达。int length = strlen(strcpy(strDest,"hello world"));
strcpy能把strSrc的内容复制到strDest,为什么还要char * 类型的返回值?
为了实现链式表达。
int length = strlen(strcpy(strDest,"hello world"));