转自:http://blog.csdn.net/f_r_e_e_x/article/details/50770907
1 //1.实现strcpy. 2 char* MyStrCpy( char *pDest, const char *pSrc ) 3 { 4 if( nullptr == pDest || nullptr == pSrc ) 5 { 6 return nullptr; 7 } 8 if( pDest == pSrc ) 9 { 10 return pDest; 11 } 12 char *pIter = pDest; 13 while( ( *pIter++=*pSrc++ ) !='