⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 read_dic.c

📁 一个c语言开发的小型的dbms系统
💻 C
字号:
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "create.h"
void read_dic(struct tab_dic_type *tab,int *tab_num,struct col_dic_type *col,int *col_num)
{FILE *fp_tab,*fp_col;
 int i=0;
 fp_tab=fopen("TABLE","rb");
 fp_col=fopen("COLUMN","rb");
 while (!feof(fp_tab))
 {fread(&tab[i],sizeof(struct tab_dic_type),1,fp_tab);
  i=i+1;
 }
 *tab_num=i-1;
 i=0;
 while (!feof(fp_col))
 {fread(&col[i],sizeof(struct col_dic_type),1,fp_col);
  i=i+1;
 }
 *col_num=i-1;
 //zhao++
 fclose(fp_tab);
 fclose(fp_col);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -