memcpy实现

  1. void *memcpy(void *dest, const void *src, int count)
  2. {
  3. void *ptr = dest;
  4. if (NULL == dest || NULL == src || count <= 0)
  5. {
  6. return NULL;
  7. }
  8. while (count--)
  9. *(char *)dest++ = *(char *)src++;
  10. return ptr;
  11. }


    推荐阅读