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

📄 showrec.c

📁 一个用C编写的简单的关系数据库系统
💻 C
字号:
void ShowRec(FILE * fp, DBF * dbf_name, RecUnion * recIn)
{
	int q = 0;
	for (; q<dbf_name->dhFieldCount; q++)
	{
		switch (dbf_name->dbf_struct[q].dhFieldType) {
		case Int:
			fread(recIn,sizeof(int),1,fp);
			printf("	%d	",recIn->intType);
			break;
		case Float:
			fread(recIn,sizeof(float),1,fp);
			printf("	%.4f	",recIn->floatType);
			break;
		case String:
			recIn->string = (char *)malloc(dbf_name->dbf_struct[q].dhFieldLen * sizeof(char));
			fread(recIn->string,dbf_name->dbf_struct[q].dhFieldLen,1,fp);
			printf("	%s	",recIn->string);
			break;
		default:
			break;
		}
	}
	puts("");
	return;
}

⌨️ 快捷键说明

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