方案一
char *strcpy(char *strDest,const char *strSrc){ assert((strDest!=NULL)&&(strSrc!=NULL)); char *address=strDest; while((*strDest++=*strSrc++)!='\0'){ NULL; } return address; }
方案二
void stringcpy(char *to,const char *form) { assert(to!=NULL&&form!=NULL); while(*form!='\0') { *to++=*form++; } *to='\0'; }