解說(shuō):
1.strcpy的實(shí)現代碼
char * strcpy(char * strDest,const char * strSrc)
{
if ((strDest==NULL)||(strSrc==NULL)) //[1]
throw "Invalid argument(s)"; //[2]
char * strDestCopy=strDest; //[3]
while ((*strDest++=*strSrc++)!=‘\0‘); //[4]
return strDestCopy;
}
聯(lián)系客服