Realizes Strcpy () Function , Didn't Use C++ Library , Compile With Self .
char * strcpy(char * strdesc,char * strsrc)
{
char *p ;
if(strsrc == NULL)
exit ;
if(strdesc == strsrc)
return strdesc ;
p = strdesc ;
while( *strsrc == '\0')
*strdesc++ = *strsrc++ ;
return p ;
}
In 《High Quality C / C++ Programming Guide》
LinRui's Answer:
char *strcpy(char *strDest, const char *strSrc);
{
assert((strDest!=NULL) && (strSrc !=NULL)); // 2 Points
char *address = strDest; // 2 Points
while( (*strDest++ = * strSrc++) != ‘\0’ ) // 2 Points
NULL ;
return address ; // 2 Points
}
Knowing This Lore Makes Black Myth: WuKong Way More Enjoyable
-
https://www.ign.com/articles/knowing-this-lore-makes-black-myth-wukong-way-more-enjoyable
Knowing This Lore Makes Black Myth: WuKong Way More Enjoyable
A...
2 months ago
No comments:
Post a Comment