//显示客户信息函数
void output()
{
struct client message;
FILE *fp;
fp=fopen("message.dat","r");
if (fp!=NULL)
{
system("cls");
printf("\n信用卡号\t客户姓名\t帐户余额\n");
while ((fread(&message,sizeof(struct client),1,fp))==1)
{
printf("%d\t\t",message.client_code);
printf("%s\t\t",message.client_name);
printf("%d\n",message.client_money);
}
}
else
{
printf("\n文件错误\n");
printf("\n按任意返回主菜单……");
getchar();
return;
}
fclose(fp);
printf("\n按任意返回主菜单……");
getchar();
}
void output()
{
struct client message;
FILE *fp;
fp=fopen("message.dat","r");
if (fp!=NULL)
{
system("cls");
printf("\n信用卡号\t客户姓名\t帐户余额\n");
while ((fread(&message,sizeof(struct client),1,fp))==1)
{
printf("%d\t\t",message.client_code);
printf("%s\t\t",message.client_name);
printf("%d\n",message.client_money);
}
}
else
{
printf("\n文件错误\n");
printf("\n按任意返回主菜单……");
getchar();
return;
}
fclose(fp);
printf("\n按任意返回主菜单……");
getchar();
}