void list_account(FILE *fp) { int i =0; printf("合计%d个账号:\n",cur_account-1);// cur_account减去多加的1 for(i = 0;i< cur_account-1;i++) { printf("账户:%d:\n",i+1); printf("账号:%d\n",accountcollection[i].account); printf("姓名:%s\n",accountcollection[i].name); printf("余额:%.2f\n",accountcollection[i].balance); } } int search_key(FILE *fp,int key,int i) { if (accountcollection[i].key == key) return 1; else return 0; }