2013年2月27日

strcpy()的实现

摘要: #include <stdio.h>#include <assert.h>char* strcpy(char *strDest,char *strSrc){ assert((strDest!=NULL)&&(strSrc!=NULL)); if(strDest==strSrc) return strDest; char *pDest=strDest; char *pSrc=strSrc; while(*pDest++=*pSrc++); *pDest='\0'; return strDest;}int main(){ char *p... 阅读全文

posted @ 2013-02-27 21:54 sherkey 阅读(115) 评论(0) 推荐(0)

导航