摘要:
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> //exit 函数需要 typedef struct arr { char* arr_name; int len; //当前数组长度 int maxlen; }*PARR,ARR; 阅读全文
摘要:
#include <stdio.h> #include <stdbool.h> #include <string.h> struct arr //定义结构体类型 { char* arr_name; int len; int maxlen; }; main() { struct arr array1 阅读全文
摘要:
#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( 阅读全文
摘要:
/*结构体基本练习 */ #include <stdio.h> #include<stdbool.h> #define MALE 0 //男 0 #define FEMALE 1 //女 1 #define MAXNAME 30 //名字数组最多字符数 #define MAXFR 10 //结构体数 阅读全文