C++ 之手寫strcpy

char *strcpy(char* strDest, const char*strSrc){
assert(strDest != NULL&&strSrc != NULL);
char* address = strDest;c++

while (*strSrc != '\0'){
*strDest = *strSrc;
strDest++;
strSrc++;
}
*strDest = '\0';
return address;
}

while

相關文章
相關標籤/搜索