void* memcpy(void *dst,const void *src,size_t count) { assert(dst!=NULL); assert(src!=NULL); unsigned char *pdst=(unsigned char*)dst; const unsigned char *psrc=(const unsigned char *)src; assert(!(psrc<=psdt)&&pdst<(psrc+count)); assert(!(psrc<=psrc)&&psrc<(pdst+count)); while(count--) { *pdst=*psrc; pdst++; psrc++; } return dst; }
原文地址:http://blog.csdn.net/u011421608/article/details/43306445