日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

vip会员管理系统c语言,路西牌会员管理系统。

發(fā)布時間:2025/3/11 windows 16 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vip会员管理系统c语言,路西牌会员管理系统。 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓

void VIP::show( Node *v)

{

no(v);

char *a=VIP::sex(v);

std::cout<

<< "會員姓名: "<< node.item.num[1]<< endl

<< "性別: "<< sex(v)<

<< "手機號碼: "<< node.item.num[2]<< endl

<< "儲值賬戶: "<< node.item.mony<< endl

<< "積分賬戶: "<< node.item.gra<< endl<

}

VIP::Node * VIP::Find(int i)

{

int a=0;

char n[11];

char *ite;

switch(i){

case 0:ite="卡號:";break;

case 1:ite="姓名:";break;

case 2:ite="手機號碼:";break;}

cout<

cin.getline(n,10);

Node *temp=head;

while(temp!=NULL)

{

if(strstr(temp->item.num[i],n)!=NULL)

{

show(temp);

a++;

temp=temp->next;

continue;

}

else if(temp->next==NULL&&a==0)

{

cout<< "沒有這個會員,重新輸入(q 退出):"<< endl;

cin.getline(n,10);

if(!strcmp(n,"q"))

break;

temp=head;

continue;

}

temp=temp->next;

}

return NULL;

}

void VIP::Save()

{

if(!Items())

{

cout<< "沒有會員..太失敗了.."<< endl;

return ;

}

Node *v=InTheVIP();

if(v!=NULL)

{

int i;

cout<< "請輸入要儲存的金額:\n";

cin>> i;

while(getchar()!='\n');

v->item.mony += i;

show(v);

}

}

void VIP::Con()

{

if(!Items())

{

cout<< "沒有會員..太失敗了.."<< endl;

return ;

}

Node *v=InTheVIP();

if(v==NULL)return;

int i;

cout<< "請輸入要消費的金額:\n";

while(cin>> i&& i!=0)

{

while(getchar()!='\n');

if(i<=v->item.mony)

{

cout<< "請輸入密碼:";

char n[10];

while(cin >>n&&strcmp(v->item.num[3],n))

{

if(strcmp(n,"q"))

return;

cout<< "輸入錯誤,請重新輸入(q退出)";

}

v->item.mony -= i;

v->item.gra += i;

cout<< "扣款成功"<

show(v);

break;

}

else

cout<< "余額不足,請重新輸入(0 退出)"<

}

}

void VIP::showall()

{

if(!Items())

{

cout<< "沒有會員.太失敗了.."<< endl;

return;

}

printf("%-15s%-10s%-15s%-15s%-15s\n", "會員卡號", "姓名", "手機號碼", "儲值賬戶", "積分賬戶");

for(Node *temp=head;temp!=NULL;temp=temp->next)

{

printf("%-15s%-10s%-15s%-15.1f%-15.1f\n",

temp->item.num[0]

,temp->item.num[1]

,temp->item.num[2]

,temp->item.mony

,temp->item.gra);

}

}

char* VIP::sex(const VIP::Node *v)

{

return v->item.morw==1?"Man":"Woman";

}

bool VIP::Err(char *n)

{

Node *temp=head;

while(temp!=NULL)

{

if(!strcmp(temp->item.num[0],n))

{

cout<< "該會員卡號已存在,請重新輸入"<

return true;

}

else temp=temp->next;

}

return false;

}

VIP::Node * VIP::InTheVIP()

{

char n[11];

cout<

cin.getline(n,10);

Node *temp=head;

while(temp!=NULL)

{

if(strcmp(temp->item.num[0],n)==0)

{

show(temp);

return temp;

}

else if(temp->next==NULL)

{

cout<< "沒有這個會員,重新輸入或在查詢會員資料處進行模糊查找(q 退出):"<< endl;

cin.getline(n,10);

if(!strcmp(n,"q"))

break;

temp=head;

continue;

}

temp=temp->next;

}

return NULL;

}

bool VIP::ToTheFile(FILE *pf)

{

int i;

Node* temp=head;

fseek(pf,0L,SEEK_SET);

for( i=0;i

{

fseek(pf,i*sizeof(Item),SEEK_SET);

fwrite(&temp->item,sizeof(Item),1,pf);

temp=temp->next;

}

return true;

}

總結

以上是生活随笔為你收集整理的vip会员管理系统c语言,路西牌会员管理系统。的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。