摘要: C 动态分配内存malloc 和 freevoid *malloc(size_t size);void free(void *pointer);calloc 和 reallocvoid *calloc(size_t num_elements, size_t elements_size);void realloc(void *ptr, size_t new_size);[代码][代码] 阅读全文
posted @ 2010-12-18 14:41 Old 阅读(275) 评论(0) 推荐(0) 编辑
摘要: C 常用字符串函数字符串长度size_t strlen(const char *string);不受限制的字符串函数char *strcpy(char *dst, const char *src);char *strcat(char *dst, const char *src);int strcmp(const char *s1, const char *s2);长度受限的字符串函数char *strncpy(char *dst, const char *src, size_t len);char *strncat(char *dst, const char *src, size_t 阅读全文
posted @ 2010-12-18 14:23 Old 阅读(302) 评论(0) 推荐(0) 编辑