#include<cstdio>
#include<iostream>
#include<iomanip>
#include ""
#include<string>
using namespace std;
{
cout<<"请输入你想要删除的客户的电话号码:";
cin>>y;
isID(y);
Delete(head,y);
} //删除
else if(choice==5)
Showall(head); //显示
else if(choice==6)
count(head); //统计
else if(choice==7)
exit(1);
}
while(choice<=7);
system("pause");
return 0;
}
void Getelem (cnode *head)
{
//添加客户函数以头节点为参数
cnode *p;
double y;
p=new cnode;
p->next=new cnode;/*申请空的节点空间*/
p->ID=" ";
cout<<"请输入姓名:";
cin>>p->name;
cout<<"请输入电话号码:";
cin>>p->ID;
isID(p->ID);
cout<<"请输入消费金额:";
cin>>p->consume;
p->integer=p->consume*100;
cout<<"积分:"<<p->integer<<endl;
p->next=head->next;
head->next=p;
}
void Search(cnode *head,string &ID)
{
cnode *p=new cnode;
double y;
p=head;
if(p->next==NULL)
cout<<"没有客户!"<<endl;
else
{
while(p->next!=NULL)
{
p=p->next;
if(ID==p->ID) //判断身份证号是否相同
{
cout<<"姓名:"<<p->name<<endl;
cout<<"身份证号:"<<p->ID<<endl;
C++客户积分管理系统v1.0代码指导 来自淘豆网m.daumloan.com转载请标明出处.