boolcheck(){FILE*fp=fopen("d:\\test.txt","租友r");//打开文件if(!fp){printf("can'仔槐topend:\\tetxt.txt!\弊戚槐n");return-1;}intrecord_num,total_money;intid,type,money,date;intrecord_num_t=0,total_money_t=0;fscanf(fp,"%d%d",&record_num,&total_money);//读入交易总金额与交易数while(fscanf(fp,"%d%d%d%d",&id,&type,&money,&date)==4)//读入每条记录{++record_num_t;total_money_t+=money;}fclose(fp);if(record_num_t==record_num&&total_money_t==total_money)//比较returntrue;returnfalse;}
合并的规则是怎么样的?