1 2 3 4 5 6 7 8 9 10 11 12
#include <string.h> void * memcpy(void * dst, const void * src, size_t n) { char * destination = (char *)dst; char * source = (char *)src; while (n--) { *destination++ = *source++; } return dst; }