实现memcopy函数:
1 void * memcpy(void *dest, const void *src, unsigned int count); 2 { 3 if ((src == NULL) || (dest == NULL)) 4 return NULL; 5 6 while (count--) 7 *dest++ = *src++; 8 9 return dest; 10 }
实现memcopy函数:
1 void * memcpy(void *dest, const void *src, unsigned int count); 2 { 3 if ((src == NULL) || (dest == NULL)) 4 return NULL; 5 6 while (count--) 7 *dest++ = *src++; 8 9 return dest; 10 }