2012年12月6日

小函数(指针操作)

摘要: 1、用指针实现拷贝字符串功能将*psource所指内容复制到*pdest中 1 char* pcopy(char *Pdest, char *Psource) 2 { 3 char *tempdest,*tempsource; 4 tempdest = Pdest;//指向目标指针头部 5 tempsource = Psource; 6 if (Psource == NULL) 7 { 8 Pdest = NULL; 9 return Pdest;10 }11 while ((*Pdest++ =*Psou... 阅读全文

posted @ 2012-12-06 16:35 whl-hl 阅读(200) 评论(0) 推荐(0)

导航