/*函数名:显示索赔信息*/
/*功能描述:本函数用于实现显示的功能*/
/*入口参数:无*/
/*出口参数:无*/
/*返回值:无*/
void keti()
{
int flag1=1;
if(head==NULL)
{
getchar();
printf("\n没有信息,按回车键返回。\n");
getchar();
system("cls");
return;
}
printf("\n全部信息如下:\n");
printf("索赔编号 服务站名称 审核人 索赔金额 索赔日期 底盘号\n\n");
p1=head;
while(p1!=NULL)
{
printf("\n%-12s%-12s%-12s%-15s%-10s%-10s\n\n",p1->num,p1->name,p1->Audit,p1->money,p1->date,p1->domain);
p1=p1->next;
}
if(flag1==1)
{
printf("\n按任意键返回!......\n");
getchar();
getchar();
system("cls"); /*清屏*/
}
}
void sum()
{
int flag1=1;
double s=0;
if(head==NULL)
{
getchar();
printf("\n没有信息,按回车键返回。\n");
getchar();
system("cls");
return;
}
p1=head;
while(p1!=NULL)
{
s=s+atof(p1->money);
p1=p1->next;
}
if(flag1==1)
{
printf("索赔总金额为:%f\n",s);
printf("按任意键返回\n");
getchar();
getchar();
system("cls"); /*清屏*/
}
}
字符串结尾最后一个字符必须是'\0'否则会一直显示后续的内存直到遇见'\0',所以。。。
* 0xABABABAB : Used by Microsoft's HeapAlloc() to mark "no man's land" guard bytes after allocated heap memory
漱 * 0xABADCAFE : A startup to this value to initialize all free memory to catch errant pointers
涵? * 0xBAADF00D : Used by Microsoft's LocalAlloc(LMEM_FIXED) to mark uninitialised allocated heap memory
很? * 0xBADCAB1E : Error Code returned to the Microsoft eVC debugger when connection is severed to the debugger
撅饰 * 0xBEEFCACE : Used by Microsoft .NET as a magic number in resource files
烫烫 * 0xCCCCCCCC : Used by Microsoft's C++ debugging runtime library to mark uninitialised stack memory
屯屯 * 0xCDCDCDCD : Used by Microsoft's C++ debugging runtime library to mark uninitialised heap memory
葺葺 * 0xDDDDDDDD : Used by Microsoft's free() or delete to mark freed heap memory
蕲蕲 * 0xDEADDEAD : A Microsoft Windows STOP Error code used when the user manually initiates the crash
* 0xFDFDFDFD : Used by Microsoft's C++ debugging heap to mark "no man's land" guard bytes before and after allocated heap memory
* 0xFEEEFEEE : Used by Microsoft's HeapFree() to mark freed heap memory