整个实验比较简单,直接展示所有代码

1、global.h

#ifndef global_h
#define global_h#define FALSE 0
#define TRUE 1#endif /* global_h */

2、tool.h

#ifndef tool_h
#define tool_hvoid timeToString(time_t t,char * pBuf);//将time_t格式时间,转换为"年-月-日 时-分"格式字符串
time_t stringToTime(char* pTime);//将"年-月-日 时-分"格式字符串,转换为time_t格式时间#endif /* tool_h */

3、tool.c

#include <stdio.h>
#include <time.h>//将time_t格式时间,转换为"年-月-日 时-分"格式字符串
void timeToString(time_t t,char* pBuf) {struct tm * timeinfo;    //定义一个tm类型的结构体指针timeinfo = localtime(&t);    //获得tm结构体的时间strftime(pBuf,20,"%Y-%m-%d %H:%M",timeinfo);     //将时间转换为"年-月-日 时-分"格式字符串}//将"年-月-日 时-分"格式字符串,转换为time_t格式时间
time_t stringToTime(char* pTime) {struct tm tm1;     //定义tm类型的结构体time_t time1;     //定义时间变量sscanf(pTime,"%d-%d-%d %d:%d",&tm1.tm_year,&tm1.tm_mon,&tm1.tm_mday,&tm1.tm_hour,&tm1.tm_min);      //将字符串格式的h时间保存到tm1变量中tm1.tm_year -= 1900;     //年份从1900年开始tm1.tm_mon -= 1;      //月份为1~12tm1.tm_sec = 0;tm1.tm_isdst = -1;time1 = mktime(&tm1);      //将struct tm类型变量的值转化为time_t类型变量的值return time1;     //返回转换后的格式时间}

4、model.h

#ifndef model_h
#define model_h//卡信息结构体
typedef struct card {       //卡信息char number[18];     //卡号char password[8];      //卡密码int status;     //卡状态 0-未上机 1-正在上机 2-已注销 3-失效time_t timeStart;     //开卡时间time_t timeEnd;      //截止时间float totalUse;      //累计金额time_t timeLast;      //最后使用时间int useCount;      //使用次数float balance;       //余额int del;     //删除标志 0-未删除 1-已删除struct card * next;}card;//计费信息结构体
typedef struct billing {       //计费信息char number[18];    //卡号time_t timeStart;      //上机时间time_t timeEnd;      //下机时间float amount;      //消费金额int status;      //消费状态 0-未结算 1-已经结算int del;      //删除标识 0-未删除 1-删除struct billing * next;}billing;#endif /* model_h */

5、main.c

#include <stdio.h>
#include <stdlib.h>
#include "model.h"
#include "menu.h"
#include "service.h"
#include "card_service.h"
#include "cardfile.h"
#include "billing_service.h"
#include "billing_file.h"#define CARDPATH "‎⁨‎⁨card.txt"
#define BILLINGPATH "billing.txt"
#define MONEYPATH "money.txt"int main(){card* head = initCardList(CARDPATH);billing* hb = initBillingList(BILLINGPATH);int nSelection = -1;printf("欢迎进入计费管理系统!\n");printf("\n");do {outputMenu();nSelection = -1;scanf("%d",&nSelection);switch(nSelection) {case 1:{add(head);  //添加卡break;}case 2:{query(head);   //查询卡break;}case 3:{logon(head,hb);    //上机break;}case 4:{settle(head,hb);    //下机break;}case 5:{addMoney(head);   //充值break;}case 6:{refundMoney(head);     //退费break;}case 7:{count(head);       //查询统计break;}case 8:{annul(head);       //注销卡break;}case 0:{exitApp();     //退出break;}default:{printf("输入的菜单编号错误!\n");break;}}printf("\n");}while(nSelection != 0);return 0;
}

6、menu.h

#ifndef menu_h
#define menu_hvoid outputMenu(void);#endif /* menu_h */

7、menu.c

#include <stdio.h>
#include <stdlib.h>
void outputMenu()
{printf("\n");printf("------------菜单----------\n");printf("1.添加卡\n");printf("2.查询卡\n");printf("3.上机\n");printf("4.下机\n");printf("5.充值\n");printf("6.退费\n");printf("7.查询统计\n");printf("8.注销卡\n");printf("0.退出系统\n");printf("-------------------------\n");printf("请输入0-8数字编号:");}

8、service.h

#ifndef service_h
#define service_h#include "model.h"void add(card*);
void query(card*);
void logon(card*, billing*);
void settle(card*, billing*);
void addMoney(card*);
void refundMoney(card*);
void count(card*);
void annul(card*);
void exitApp(void);#endif /* service_h */

9、service.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>#include "model.h"
#include "global.h"
#include "tool.h"
#include "cardfile.h"
#include "card_service.h"
#include "billing_file.h"
#include "billing_service.h"#define CARDPATH "‎⁨‎⁨card.txt"
#define BILLINGPATH "billing.txt"
#define INFORPATH "information.txt"void add(card* head)
{card * pNew = (card*)malloc(sizeof(card));printf("\n----------添加卡-----------\n");printf("请输入卡号(长度为1~18):");char number[18] = {0};   // 输入的卡号scanf("%s", number);if(isExsit(number,CARDPATH) == TRUE) {printf("此卡已存在!添加卡失败!\n");return;}strcpy(pNew->number, number);printf("请输入密码(长度为1~8):");char password[8] = {0};    // 输入的密码scanf("%s", password);strcpy(pNew->password, password);printf("请输入开卡金额(RMB):");float m;scanf("%f", &m);pNew->balance = m;pNew->totalUse = pNew->balance;    // 添加卡时,累计金额等于开卡金额pNew->del = 0;                     // 删除标识pNew->status = 0;                  // 卡状态pNew->useCount = 0;                // 使用次数pNew->timeEnd = pNew->timeLast = pNew->timeStart = time(NULL);// 开卡时间,截止时间,最后使用时间都默认为当前时间。// 根据开卡时间,计算截止时间,每张卡的有效期为一年struct tm *endtime ;     // 截止时间struct tm *starttime ;   // 开卡时间starttime = localtime(&(pNew->timeStart));endtime = localtime(&(pNew->timeEnd));endtime->tm_year = starttime->tm_year + 1;pNew->timeEnd = mktime(endtime);      //截止时间为开卡时间的后一年整if( savecard(pNew,CARDPATH) == FALSE) {printf("添加卡失败!\n");}else {printf("添加卡成功!\n\n");}printf("\n------添加的卡信息如下------\n");printf("卡号\t\t密码\t\t状态\t\t开卡金额\n");printf("%s\t\t%s\t\t0\t\t%.2f\n",pNew->number,pNew->password,pNew->balance);printf("\n");card *p = head;while( p->next != NULL ) {p = p->next;}p->next = pNew;p = p->next;p->next = NULL;}void query(card* head)
{printf("\n----------查询卡-----------\n");printf("请选择查询的方式:\n");printf("1.精确查询\n");printf("2.模糊查询\n");printf("请输入选择(1或2):");int item;scanf("%d",&item);if(item == 1) {queryCard(head);}else if(item == 2) {queryCards(head);}else {printf("输入错误!\n");}}void logon(card* head, billing* pb)
{printf("\n----------上机-----------\n");card* p = NULL;int index = 0;     //卡信息在链表中的索引printf("请输入卡号<长度为1~18>:");char number[18];scanf("%s",number);printf("请输入密码(长度为1~8):");char password[8];    // 输入的密码scanf("%s", password);//根据卡号和密码,从链表中获取卡信息和卡信息在链表中的索引p = checkCard(number, password, head, &index);//如果卡信息为空,表示没有该卡信息,上机失败if( p == NULL ) {printf("该卡信息不存在!上机失败!\n");return;}//如果卡状态不为0,表示该卡不能上机if( p->status != 0 ) {printf("该卡不能上机!上机失败!\n");return;}//如果卡余额为0,不能上机if( p->balance == 0 ) {printf("你个穷鬼还想上网???充钱去吧!!!\n");return;}//如果可以上机,更新卡信息p->status = 1;      //状态为正在使用p->useCount ++;     //使用次数加1p->timeLast = time(NULL);      //更新最后使用时间为当前时间//更新文件中的卡信息if( updateCard(p, CARDPATH, index) == FALSE ) {printf("无法更新!\n");return;}billing* pnew;pnew = (billing*)malloc(sizeof(struct billing));strcpy(pnew->number,p->number);pnew->timeStart = time(NULL);pnew->timeEnd = 0;pnew->amount = 0;pnew->status = 0;pnew->del = 0;if( savebilling(pnew,BILLINGPATH) == FALSE) {printf("计费信息添加失败!\n");return;}billing* pp = pb;while( pp->next != NULL ) {pp = pp->next;}pp->next = pnew;pp = pp->next;pp->next = NULL;printf("上机成功!\n");}void settle(card* head, billing* hp)
{printf("\n----------下机-----------\n");card* p = NULL;int index = 0;printf("请输入卡号<长度为1~18>:");char number[18];scanf("%s",number);printf("请输入密码(长度为1~8):");char password[8];scanf("%s", password);//根据卡号和密码,从链表中获取卡信息和卡信息在链表中的索引p = checkCard(number, password, head, &index);//如果卡信息为空,表示没有该卡信息,下机失败if( p == NULL ) {printf("该卡信息不存在!下机失败!\n");return;}//如果卡状态不为1,表示该卡不能下机if( p->status != 1 ) {printf("该卡不能下机!下机失败!\n");return;}//如果可以下机,更新卡信息p->status = 0;      //状态为未上机p->useCount ++;     //使用次数加1p->timeLast = time(NULL);      //更新最后使用时间为当前时间int index2 = 0;billing* bp = NULL;bp = checkBilling(number, hp, &index2);//如果一分钟一元float every = 1;time_t now;time_t starttime;time(&now);starttime = bp->timeStart;double c;int minute = 0;c = difftime(now, starttime);minute = c / 60;p->balance = p->balance- every * minute;p->totalUse += every * minute;bp->amount = every * minute;bp->timeStart = p->timeStart;bp->timeEnd = time(NULL);if( savebilling(bp,INFORPATH) == FALSE) {printf("添加卡信息失败!\n");return;}//更新卡文件中的卡信息if( updateCard(p, CARDPATH, index) == FALSE ) {printf("更新卡信息失败!下机失败!\n");return;}//更新计费文件中计费信息if( updateBilling(bp, BILLINGPATH, index) == FALSE ) {printf("更新计费信息失败!下机失败!\n");return;}printf("应付金额:%.2f\n",every * minute);printf("卡中剩余余额:%.2f\n",p->balance);printf("下机成功!\n");return;
}void addMoney(card* head)
{printf("\n----------充值-----------\n");printf("请输入卡号<长度为1~18>:");char number[18];scanf("%s",number);printf("请输入充值金额:");float money;scanf("%f",&money);FILE * fp = NULL;if((fp = fopen(CARDPATH,"rb")) == NULL) {printf("卡文件打开失败!\n");}card *q = head->next;while( q != NULL) {if( strcmp(q->number, number) == 0) {q->balance += money;q->totalUse += money;}q = q->next;}int index = 0;card* p = (card*)malloc(sizeof(card));p->next = NULL;while(!feof(fp)) {index ++;if(fread(p,sizeof(card),1,fp) != 0) {if( strcmp(p->number,number) == 0) {break;}}}p->balance += money;p->totalUse += money;if( updateCard(p, CARDPATH, index) == TRUE) {printf("充值成功!\n");}free(p);fclose(fp);}void refundMoney(card* head)
{printf("\n----------退费-----------\n");printf("请输入卡号<长度为1~18>:");char number[18];scanf("%s",number);printf("请输入要退的金额:");float money;scanf("%f",&money);card *q = head->next;while( q != NULL) {if( strcmp(q->number, number) == 0) {if(q->balance < money) {printf("余额不足!\n");printf("请充值!\n");return;}else {q->balance -= money;q->timeLast =time(NULL);}}q = q->next;}FILE * fp = NULL;if((fp = fopen(CARDPATH,"rb")) == NULL) {printf("卡文件打开失败!\n");}int index = 0;card* p = (card*)malloc(sizeof(card));while(!feof(fp)) {index ++;if(fread(p,sizeof(card),1,fp) != 0) {if( strcmp(p->number,number) == 0) {break;}}}p->balance -= money;if( updateCard(p, CARDPATH, index) == TRUE) {printf("退费成功!\n");}free(p);fclose(fp);
}void count(card* head)
{printf("\n----------查询统计菜单-----------\n");printf("1.总卡数\n");printf("2.所有卡的信息\n");printf("3.卡总充值金额\n");printf("4.总营业额\n");printf("5.查询消费记录\n");printf("-------------------------\n");printf("请输入1-4数字编号:");int num;scanf("%d",&num);switch(num) {case 1: {printf("一共有%d张卡\n",getCardCount(CARDPATH));break;}case 2: {showallcards(CARDPATH);break;}case 3: {card* p = head->next;float sum = 0;while( p->next != NULL) {sum += p->totalUse;p = p->next;}printf("所有卡的充值金额为%f\n",sum);break;}case 4: {card* p = head->next;float sum = 0, del = 0, re = 0;while( p->next != NULL ) {sum += p->totalUse;del += p->balance;p = p->next;}re = sum - del;printf("总营业额为%f\n",re);break;}case 5: {printf("请输入要查询的卡号:");char name[18];scanf("%s",name);showinformation(INFORPATH, name);break;}default: {printf("输入的数字错误!\n");break;}}}void annul(card* head)
{printf("\n----------注销卡-----------\n");printf("请输入卡号<长度为1~18>:");char number[18];scanf("%s",number);card *q = head->next;while( q != NULL) {if( strcmp(q->number, number) == 0) {q->status = 2;}q = q->next;}FILE * fp = NULL;if((fp = fopen(CARDPATH,"rb")) == NULL) {printf("卡文件打开失败!\n");}int index = 0;card* p = (card*)malloc(sizeof(card));p->next = NULL;while(!feof(fp)) {index ++;if(fread(p,sizeof(card),1,fp) != 0) {if( strcmp(p->number,number) == 0) {p->status = 2;printf("剩余金额:%f,退费金额:%f\n",p->balance,p->balance);printf("退费成功!\n");if( updateCard(p, CARDPATH, index) == TRUE) {printf("注销成功!\n");}free(p);fclose(fp);return;}}}printf("此卡不存在\n!");free(p);fclose(fp);}void exitApp()
{printf("\n----------退出系统-----------\n");printf("谢谢使用!\n");exit(0);}

10、cardfile.h

#ifndef cardfile_h
#define cardfile_hint savecard(card *, char *);void inputCard(card *);void showcard(card *);int updateCard(card*, char*, int);int getCardCount(char*);int isExsit(char* , char*);void showallcards(char* );#endif /* cardfile_h */

11、cardfile.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "model.h"
#include "global.h"
#include "tool.h"int savecard(card *p, char *path) {FILE *fp = NULL;if((fp = fopen(path,"ab")) == NULL ) {   //以追加的模式打开文件,如果打开失败,则以只写的模式打开文件if((fp = fopen(path,"wb")) == NULL ) {return FALSE;}}fwrite(p,sizeof(card),1,fp);fclose(fp);return TRUE;}void showcard(card *p) {char lastTime[50];printf("卡号\t\t状态\t\t余额\t\t累计使用\t\t使用次数\t\t上次使用时间\n");timeToString(p->timeLast,lastTime);printf("%s\t\t%d\t\t%0.2f\t\t%.2f\t\t%d\t\t%s\n",p->number,p->status,p->balance,p->totalUse,p->useCount,lastTime);}int updateCard(card* p, char* path, int index)
{FILE* fp = NULL;    // 文件指针int line = 0;      // 文件卡信息数long position = 0;    // 文件位置标记card bBuf;if((fp = fopen(path, "rb+")) == NULL){return FALSE;}while((!feof(fp)) && (line < index-1)){if(fread(&bBuf, sizeof(card), 1, fp) != 0){      // 获取文件标识位置position = ftell(fp);line++;}}fseek(fp, position, 0);fwrite(p, sizeof(card), 1, fp);fclose(fp);return TRUE;}int getCardCount(char* path)
{FILE* p = NULL;  // 文件指针int index = 0;   // 卡信息数量card* pCard = (card*)malloc(sizeof(card));if((p = fopen(path, "rb")) == NULL){return 0;}while(!feof(p)){if(fread(pCard, sizeof(card), 1, p) != 0)index++;}fclose(p);free(pCard);return index;}int isExsit(char* num,char* path)
{FILE* p = NULL;     // 文件结构体指针char number[18]={0};       // 存放读取出的卡号if((p = fopen(path, "rb")) == NULL) {return FALSE;}while(!feof(p)) {// 读取卡号,并比较卡号是否为当前查找的卡号if(fread(number, sizeof(number), 1, p) != 0) {if(strcmp(number, num) == 0) {fclose(p);return TRUE;}else {fseek(p, sizeof(card) - sizeof(number), SEEK_CUR);}}}fclose(p);return FALSE;}void showallcards(char* path) {FILE* p = NULL;card* pCard = (card*)malloc(sizeof(struct card));if((p = fopen(path, "rb")) == NULL){printf("打开卡文件失败!\n");}while(!feof(p)){if(fread(pCard, sizeof(card), 1, p) != 0) {showcard(pCard);}}fclose(p);free(pCard);}

12、card_service.h

#ifndef card_service_h
#define card_service_h#include "model.h"card* initCardList(char*);     //初始化卡信息链表
void releaseCardList(card*);       //释放卡信息链表
void queryCard(card*);      //在卡信息链表中,查询卡号相同的卡信息
void queryCards(card*);       //根据输入的关键字,在卡信息链表中,查询卡号中包含关键字的卡信息
card* checkCard(char*, char*, card*, int*);     //根据卡号和密码,在链表中查询卡信息,并获取查询到的卡信息在链表中的位置#endif /* card_service_h */

13、card_service.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>#include "model.h"
#include "global.h"
#include "tool.h"
#include "cardfile.h"card* initCardList(char* path) {card *head;head = (card*)malloc(sizeof(struct card));head->next = NULL;card* p = head;while(p->next != NULL) {p = p->next;}FILE* fp = NULL;if( (fp = fopen(path, "rb")) == NULL ) {return head;}while(!feof(fp)) {card* pCard = (card*)malloc(sizeof(struct card));if(fread(pCard, sizeof(card), 1, fp) != 0) {p->next = pCard;p = p->next;p->next = NULL;}}fclose(fp);return head;}void releaseCardList(card* p) {        //释放卡信息链表free(p);}void queryCard(card* head) {       //在卡信息链表中,查询卡号相同的卡信息printf("\n----------查询卡-----------\n");printf("请输入要查询的卡号(长度为1~18):");char number[18] = {0};   // 输入的卡号scanf("%s", number);card *p = head->next;while( p != NULL) {if( strcmp(p->number, number) == 0 ) {showcard(p);return;}p = p->next;}printf("此卡不存在!\n");}void queryCards(card* head) {        //根据输入的关键字,在卡信息链表中,查询卡号中包含关键字的卡信息printf("\n----------查询卡-----------\n");printf("请输入要查询的关键词(长度为1~18):");char number[18] = {0};scanf("%s",number);card* p = head->next;while( p != NULL ) {if( strstr(p->number,number) != NULL ) {showcard(p);}p = p->next;}}card* checkCard(char* number, char* password, card* head, int* index) {      //根据卡号和密码,在链表中查询卡信息,并获取查询到的卡信息在链表中的位置card *p = head->next;while( p != NULL) {(*index) ++;if( (strcmp(p->number, number) == 0)&&(strcmp(p->password,password) == 0)) {return p;}p = p->next;}return NULL;}

14、billing_file.h

#ifndef billing_file_h
#define billing_file_hint savebilling(billing*, char*);
void showbilling(billing*);
int getbillingnum(billing*, char*);
int updateBilling(billing*, char*, int);
void showinformation(char* ,char* );#endif /* billing_file_h */

15、billing_file.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "model.h"
#include "global.h"
#include "tool.h"int savebilling(billing* p, char *path) {    //将计费信息保存到文件中FILE *fp = NULL;if((fp = fopen(path,"ab")) == NULL ) {   //以追加的模式打开文件,如果打开失败,则以只写的模式打开文件if((fp = fopen(path,"wb")) == NULL ) {return FALSE;}}fwrite(p,sizeof(billing),1,fp);fclose(fp);return TRUE;}void showbilling(billing* bp, char* number, char* path) {     //从文件中读取计费信息char startTime[50];FILE* p = NULL;  // 文件指针billing* pb = (billing*)malloc(sizeof(billing));if((p = fopen(path, "rb")) == NULL){printf("打开文件失败!\n");return;}while(!feof(p)){if(fread(pb, sizeof(card), 1, p) != 0)if( strcmp(pb->number, number) == 0 ) {printf("卡号\t\t状态\t\t消费状态\t\t删除标识\t\t上机时间\n");timeToString(pb->timeStart,startTime);printf("%s\t\t%d\t\t%d\t\t%d\t\t%s\n",pb->number,pb->status,pb->status,pb->del,startTime);}}fclose(p);free(pb);}int getbillingnum(billing* hp, char* path) {     //从文件中获取计费信息的数量FILE* p = NULL;  // 文件指针int index = 0;card* pCard = (card*)malloc(sizeof(card));if((p = fopen(path, "rb")) == NULL){return 0;}while(!feof(p)){if(fread(pCard, sizeof(card), 1, p) != 0)index++;}fclose(p);free(pCard);return index;}int updateBilling(billing* p, char* path, int index)
{FILE* fp = NULL;    // 文件指针int line = 0;      // 文件卡信息数long position = 0;    // 文件位置标记card bBuf;if((fp = fopen(path, "rb+")) == NULL){return FALSE;}while((!feof(fp)) && (line < index-1)){if(fread(&bBuf, sizeof(card), 1, fp) != 0){      // 获取文件标识位置position = ftell(fp);line++;}}fseek(fp, position, 0);fwrite(p, sizeof(card), 1, fp);fclose(fp);return TRUE;}void showinformation(char* path,char* name) {FILE* p = NULL;billing* bp = (billing*)malloc(sizeof(struct billing));if((p = fopen(path, "rb")) == NULL){printf("打开计费信息文件失败!\n");}char startTime[50];char endTime[50];while(!feof(p)){if(fread( bp, sizeof(billing), 1, p) != 0) {if( strcmp(bp->number,name) == 0) {printf("消费状态\t\t消费金额\t\t上机时间\t\t下机时间\t\t删除标识\n");timeToString(bp->timeStart,startTime);timeToString(bp->timeEnd,endTime);printf("%d\t\t\%f\t\t%s\t\t%s\t\t%d\n",bp->status,bp->amount,startTime,endTime,bp->del);}}}fclose(p);free(bp);}

16、billing_service.h

#ifndef billing_service_h
#define billing_service_hbilling* initBillingList(char*);
void releaseBillingList(billing*);
int getbilling(billing*, char*, char*);
billing* checkBilling(char*, billing*, int*);#endif /* billing_service_h */

17、billing_service.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "model.h"
#include "global.h"
#include "tool.h"billing* initBillingList(char* path) {billing* head;head = (billing*)malloc(sizeof(billing));head->next = NULL;billing* p = head;while(p->next != NULL) {p = p->next;}FILE* fp = NULL;if((fp = fopen(path,"rb")) == NULL) {return head;}while(!feof(fp)) {billing* pBilling = (billing*)malloc(sizeof(struct billing));if(fread(pBilling, sizeof(billing), 1, fp) != 0) {p->next = pBilling;p = p->next;p->next = NULL;}}fclose(fp);return head;}void releaseBillingList(billing* p) {        //释放计费信息链表free(p);}int getbilling(billing* hp, char* path, char* num) {     //从计费信息文件获取计费信息保存到计费链表中FILE* p = NULL;if((p = fopen(path, "rb")) == NULL) {return FALSE;}billing* pp = hp;while( pp->next != NULL ) {pp = pp->next;}billing* pnew = (billing*)malloc(sizeof(struct billing));while(!feof(p)) {if(fread(pnew,sizeof(billing),1,p) != 0 )if(strcmp(pnew->number, num) == 0) {pp->next = pnew;pp = pp->next;pp->next = NULL;fclose(p);return TRUE;}}fclose(p);return FALSE;}billing* checkBilling(char* number, billing* hp, int* index) {     //在计费信息链表中,查询对应卡的计费信息,并获取该计费信息在链表中的索引号billing *p = hp->next;while( p != NULL) {(*index) ++;if( strcmp(p->number, number) == 0) {return p;}p = p->next;}return NULL;}

计费管理系统(武汉理工大学计算机基础与综合编程实验)相关推荐

  1. 计算机基础和综合实验,计算机基础与综合编程实验报告.doc

    计算机基础与综合编程实验报告 学号 <计算机基础与综合编程实验>报告 学 院计算机科学与技术学院专 业计算机类班 级姓 名指导教师 日期 1 实验目的 通过迭代式开发,深入掌握C语言的文件 ...

  2. 武汉理工大学计算机基础与编程综合实验——网吧计费管理系统第二个版本

    文章目录 前言 系统需求分析和注意事项 具体实现(链表基本操作) model.h AMS.cpp cardList.cpp CardListInit() addNewCard() displayCar ...

  3. 武汉理工大学计算机网,武汉理工大学计算机基础综合实验

    [实例简介] 武汉理工大学软件工程专业计算机基础综合实验(c实验),计费管理系统.基本功能加部分扩展功能实现,经过验收合格. [实例截图] [核心代码] 计算机基础综合实验 └── AMS ├── A ...

  4. 武汉理工大学计算机基础与编程综合实验——网吧计费管理系统第一个版本

    文章目录 前言 系统需求分析 基本功能结构 卡管理:新增卡.查询卡.注销卡 计费标准管理:新增标准.查询标准.删除标准.修改标准. 计费管理:上机.下机. 费用管理:充值.退费. 查询统计:查询消费记 ...

  5. 武汉理工大学计算机基础与编程实验—网吧计费管理系统(含扩展超级管理员功能)

    billing_file.h #ifndef BILLING_FILE_H #define BILLING_FILE_H //避免头文件被重复包含 #include"model.h" ...

  6. 武汉理工大学计算机组成与系统结构 Educoder实验

    文章目录 前言 实验资料 一.计算机数据表示实验 第1关:汉字国标码转区位码实验 第2关:汉字机内码获取实验 第3关:偶校验编码设计 第4关:偶校验解码电路设计 第5关:16位海明编码电路设计 第6关 ...

  7. 2023武汉理工大学计算机考研信息汇总

    武汉理工大学计算机科学与技术学院 计算机学院经过20多年的发展与建设,目前已具备"计算机应用技术"博士学位授予权."计算机应用技术"和"计算机软件与理 ...

  8. 2018武汉理工大学计算机考研真题+复试经验

    2018武汉理工大学计算机考研真题+复试经验 初试 对于专硕的同学来说,分非常重要(占成绩70%),尽量还是多考点分吧,公共课我就不说了,网上攻略很多,今年普遍都很难,尤其是数学,70-80很多,所以 ...

  9. 2024武汉理工大学计算机考研信息汇总

    最新数据见:武汉理工大学_信息汇总_N诺计算机考研 武汉理工大学计算机科学与技术学院 计算机学院经过20多年的发展与建设,目前已具备"计算机应用技术"博士学位授予权."计 ...

最新文章

  1. 社区网站功能实现系列(三):社区页面无刷新回发的一种实现方式
  2. Boost:传输文件的测试程序
  3. php图片地址参数错误,图片上传时一直显示请求地址错误怎么办
  4. [Swift]LeetCode86. 分隔链表 | Partition List
  5. Flex与ASP.NET通过Remoting方式交互说明文档
  6. Linux文件系统性能测试工具fdtree和iozone
  7. Linux环境下如何计算CPU占用率
  8. 背包问题——01背包问题——Charm Bracelet
  9. Java中JDK安装以及环境变量设置
  10. 网管学习日记-ACL
  11. 一年代码功能点的创新性怎么写_创新项目计划书模板
  12. c语言实验编码sdut,C语言实验一(1)
  13. Elasticsearch7.x学习
  14. 魔窗-企业级Deeplink解决方案,你的App增长引擎!
  15. java包装类string_Java学习之String类与包装类
  16. ios视频通话三方_自己实现简易版 多人视频通话 iOS Android
  17. 分享5款超级实用的电脑软件
  18. 如何比较两个文本的相似度
  19. 2022出圈的ML研究:爆火的Stable Diffusion、通才智能体Gato,LeCun转推
  20. 程序设计综合实践——京东管理系统(C语言实现)

热门文章

  1. Piexl 解锁方法
  2. 手电筒软件测试初学者,新手学习android做得一个闪光灯手电筒(测试过很多机型都可以)...
  3. 3、查询所有学生的学号、姓名、选课数、总成绩
  4. html锚点定位(锚点链接:name还是id,一文搞定)
  5. Activiti教程
  6. 2021年广西省安全员C证新版试题及广西省安全员C证复审考试
  7. [C语言]什么是编辑器和编译器,什么是集成开发环境?编译原理又是什么?
  8. redhat 7部署squid(代理)服务
  9. java练手项目 --- 校园兼职平台
  10. 我的保研全过程——推免经验从夏令营到预推免,再到最后填报的全过程记录