#include <stdio.h> void _strcpy(char *s, char *t) { while(*s++ = *t++) ; } int main() { char buf1[] = "tanxiaohai"; char buf2[20] = {0}; _strcpy(buf2, buf1); printf("%s\n",buf2); return 0; }
|
|
来自: 海漩涡 > 《C_programming_language》