![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C
ccczxacxzxcz
Be low.
展开
-
C语言结构体实现类似C++的构造函数
#include <stdio.h>#include <stdlib.h>#include <string.h>typedef struct string{ char data[128]; int length; void (*set)(struct string *it, int len);} String;void set...原创 2019-05-14 10:09:56 · 886 阅读 · 1 评论 -
C语言实现strcat / strlen / strcmp / strcpy
strcatchar *m_strcat(char *des, const char *src){ assert((des != NULL) && (src != NULL)); char *add = des; while (*des != '\0') ++des; while (*des++ = *src++) ...原创 2019-05-27 08:45:32 · 165 阅读 · 0 评论