1
摘要: C语言-常用函数 _finddata_t结构体用法 功能:用来存储文件各种信息的结构体 依赖:头文件<io.h> 主要语法: struct _finddata_t{ unsigned attrib; time_t time_create; time_t time_access; time_t tim 阅读全文
posted @ 2023-10-18 20:26 Bonne_chance 阅读(95) 评论(0) 推荐(0)
摘要: C语言-读取一个目录中的文件,并将文件名写入数组 注意点: 文件名是字符串,放入数组,需要数组二维数组,array[m][n], m表示字符串的个数,n表示字符串的长度; 使用函数char* strcpy(char* destination,const char* source), 例如: char 阅读全文
posted @ 2023-10-18 16:36 Bonne_chance 阅读(350) 评论(0) 推荐(0)
摘要: C语言-结构体使用 #include <stdio.h> #include <stdlib.h> #include <string.h> //结构体 /*结构体定义*/ struct Person{ char name[20]; int age; }; int main(){ /*结构体赋值*/ s 阅读全文
posted @ 2023-10-18 12:33 Bonne_chance 阅读(19) 评论(0) 推荐(0)
摘要: C语言-数组初始化方式 # include <stdio.h> # include <string.h> //数组初始化 int main(){ //方式1:{0} int arr1[3] = {0}; for(int i= 0;i<3;i++){ printf("arr1[%d] = %d\n", 阅读全文
posted @ 2023-10-18 12:06 Bonne_chance 阅读(111) 评论(0) 推荐(0)
1