摘要: 1、main 调用自定义字符串函数,只需要include “MyString.h”即可 2、myString.h //自定义字符串函数声明 3、realizeMyString.c 自定义函数实现 阅读全文
posted @ 2019-08-11 21:54 Coding_Changes_LIfe 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 1,结构体定义 2、结构体嵌套 3、结构体数组 4、结构体指针 5、指向结构体数组的指针 6、用指向结构体的指针作函数参数用结构体变量的成员作参数 值传递,新建副本用指向结构体变量或数组的指针作参数 地址传递用结构体变量作参数 多值传递,效率低,也是值传递 7、内存动态分配 阅读全文
posted @ 2019-08-11 17:27 Coding_Changes_LIfe 阅读(214) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <stdio.h> #include <locale.h> void main(){ printf("你好天朝"); //unicode 编码会输出乱码:浣犲ソ澶╂湞 //用多字符集编码不会乱码 char str[20] = "你好中国"; printf("%s\n",str); //unicode 编码会输出乱码:姴銈芥稉顓炩偓 pr 阅读全文
posted @ 2019-08-11 14:05 Coding_Changes_LIfe 阅读(304) 评论(0) 推荐(0) 编辑
摘要: //自主实现字符串函数strset(char * str, char c) #include #include #include ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////... 阅读全文
posted @ 2019-08-11 12:39 Coding_Changes_LIfe 阅读(979) 评论(0) 推荐(0) 编辑