摘要: #include <stdio.h> #include <stdbool.h> #include <stdlib.h> //exit 函数需要 typedef struct arr { char* arr_name; int len; //当前数组长度 int maxlen; }*PARR,ARR; 阅读全文
posted @ 2020-05-31 23:32 abel2020 阅读(180) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdbool.h> #include <string.h> struct arr //定义结构体类型 { char* arr_name; int len; int maxlen; }; main() { struct arr array1 阅读全文
posted @ 2020-05-31 18:30 abel2020 阅读(1167) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> void fun(int** q); void fun2(int** q); main() { int* p; //把p的二级指针传给fun fun(&p); printf("%d", *p); //动态分配内存 fun2(&p); } // void fun( 阅读全文
posted @ 2020-05-31 15:25 abel2020 阅读(121) 评论(0) 推荐(0) 编辑
摘要: /*结构体基本练习 */ #include <stdio.h> #include<stdbool.h> #define MALE 0 //男 0 #define FEMALE 1 //女 1 #define MAXNAME 30 //名字数组最多字符数 #define MAXFR 10 //结构体数 阅读全文
posted @ 2020-05-31 04:36 abel2020 阅读(191) 评论(0) 推荐(0) 编辑