为了避免strcpy源串覆盖问题(P220),自实现strcpy。
#include <stdio.h> #include <string.h> #include <assert.h> #include <malloc.h> void myStrcpy(char *to, char *from) { assert(to != NULL && from != NULL); while(*from != '