strcpy 函数

 1 char *strcpy(char *strDest, const char *strSrc)
 2 {
 3     assert((strDest != NULL) && (strSrc != NULL));
 4     char *address = strDest;
 5     while((*strDest++ = *strSrc++) != '\0')
 6     NULL;
 7     return address;
 8 }
 9 
strcpy 返回char *是为了实现链式表达式。比如 int length = strlen(strcpy(strDest, "hello,world"));
posted @ 2015-03-24 15:08  David_W  阅读(174)  评论(0编辑  收藏  举报