fprintf(fp1,\ }
int ReadComputer2(FILE *fp1){ 读出付本中的数据(文本方式) int j,k;
fscanf(fp1,\ k=num[0].num; return(k); } */
void Additive2Two(int i,FILE *fp1){ /*数据写入付本文件(二进制方式)*/ char str2[]={\
if(strcmp(filename2,str2)!=0)
strcpy(num[0].name,filename2); else
strcpy(num[0].name,filename2); num[0].num=i;
if((fwrite(&num[0],sizeof(struct count),1,fp1))!=1) {printf(\付本文件数据写入错误! \\n\ fclose(fp1); } }
int ReadComputer2Two(FILE *fp1){ /*读出付本中的数据(二进制方式)*/ int j;
if((fread(&num[0],sizeof(struct count),1,fp1))!=1) {printf(\付本文件数据读取错误! \\n\ fclose(fp1); }
j=num[0].num; return(j); } /* ************************************************************ *********************************************************** */
void Num_inquire(){ /*学号查询*/
int num,j,time; FILE *fp1,*fp2;
fp1=readfile(); /*读取文档*/
fp2=readfile2(); /*(开打方式'读'**'引用读文件名')读文件付本*/
time=ReadComputer2Two(fp2); /*读出付本中的数据(二进制方式)*/
ReadComputer2(time,fp1); /*(2方式)数据写入机器*/
fclose(fp1);fclose(fp2); printf(\输入学号:\ scanf(\ /*getchar();*/
for(j=1;j
用C语言开发小型数据库管理系统代码文库



