user-0 提问: 急求大佬帮忙，c语言做了个简单的网吧管理系统，现在出问题不知道怎么改了

回复:
user: user-1
content: C和C++完整教程:https://blog.csdn.net/it_xiangqiang/category_10581430.html C和C++算法完整教程:https://blog.csdn.net/it_xiangqiang/category_10768339.html

user: user-2
content: 供参考：//#include"Mylist.h" //run this program using the console pauser or add your own getch, system("pause") or input loop    #include<stdio.h> #include<stdlib.h>   struct VIP {     char name[20]; //会员姓名     int  idN,VIPN,PN,integral,time,CN; //身份证号码，会员号，电话号码，会员积分，上机时间，机子编号 };  struct Node {     //int data;     struct VIP data;     struct Node* next; };  //创建表 struct Node* createList() {     struct Node* headNode = (struct Node*)malloc(sizeof(struct Node));     headNode->next = NULL;     return headNode; }   //创建结点 struct Node* createNode()//(struct VIP data) {     struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));     //newNode->data = data;     newNode->next = NULL;     return newNode; }  //插入结点 void insertNodeByHead(struct Node* headNode,struct VIP data) {     struct Node* newNode = createNode();//(data);     newNode->data  = data;  //表头法     newNode->next  = headNode->next;     headNode->next = newNode; }  struct Node* list = createList();  //查找功能 struct Node* searchInfoByData(struct Node* headNode,int VIPN) {     struct Node* pMove = headNode->next;     if(pMove == NULL)          return NULL;     for (;pMove != NULL;pMove = pMove->next)         if (pMove->data.VIPN == VIPN)             return pMove;     return NULL; }  //指定位置删除 void deleteAppoinNode(struct Node* headNode,int VIPN) {     struct Node* posNode ,* posFrontNode ;          for(posNode = headNode,posFrontNode = NULL;         posNode != NULL && posNode->data.VIPN != VIPN;         posFrontNode = posNode,posNode = posNode->next);      if(posNode == NULL)     //未找到       {         printf("未找到指定位置信息，无法删除！\n");         return;       }     if(posFrontNode == NULL)//第一个节点       {         headNode = headNode->next;       }     else       {         posFrontNode->next = posNode->next;       }     free(posNode); }  //文件读操作 void readInfoFromFile(struct Node* headNode, char *fileName) {           FILE *fp;      struct VIP data;      fp = fopen(fileName, "r+");//1.打开      if (fp == NULL)       {          printf("\n*********新的网吧管理系统*************\n");          return;       }                                 //2.读文件      while(fscanf(fp,"%s %d %d %d %d %d %d\n",data.name,&data.idN,&data.VIPN,&data.PN,                                                    &data.integral,&data.time,&data.CN)==7)       {         insertNodeByHead(headNode, data);       }      fclose(fp) ; //3.关闭文件 } //文件写操作 void writeInfoToFile(struct Node* headNode,char *FileName) {     FILE *fp;     fp = fopen(FileName,"w+");     if (fp == NULL)       {          printf("不能打开文件！\n");          return;       }     struct Node* pMove = headNode->next;     while(pMove)      {         fprintf(fp,"%s %d %d %d %d %d %d\n",pMove->data.name,pMove->data.idN,pMove->data.VIPN,                              pMove->data.PN,pMove->data.integral,pMove->data.time,pMove->data.CN);         pMove = pMove->next;      }     fclose(fp); }   //打印链表  void printflist(struct Node* headNode) {     struct Node*pMove = headNode->next;     printf("会员姓名\t\t身份证号码\t\t会员号\t\t电话号码\t\t会员积分\t\t上机时间\t\t机子编号\n");     while (pMove)      {         printf("%-20s\t%-18d\t%-18d\t%-18d\t%-12d\t%-12d\t%-12d\n",pMove->data.name,pMove->data.idN,                pMove->data.VIPN,pMove->data.PN,pMove->data.integral,pMove->data.time,pMove->data.CN);         pMove = pMove->next;      }     printf("\n"); }  void menu() {     printf("----------网吧管理系统---------\n");     printf("\t1.添加会员信息\t\n");     printf("\t2.浏览会员信息\t\n");     printf("\t3.删除会员信息\t\n");     printf("\t4.添加上网信息\t\n");     printf("\t5.删除上网信息\t\n");     printf("\t6.查找会员信息\t\n");     printf("\t0.退出管理系统\t\n");     printf("-------------------------------\n"); }  void keyDown() {     int choice = 0;     struct VIP data;     struct Node * searchID ;     printf("请输入你的选择：");     fflush(stdout);     rewind(stdin);     scanf("%d",&choice);     switch(choice)                  {                  case 1:                         printf("--------添加会员信息---------\n");                         printf("请输入会员姓名,身份证号码，会员号，电话号码，会员积分:");                         fflush(stdout);           //清空缓冲区                         rewind(stdin);                         scanf("%s%d%d%d%d",data.name,&data.idN,&data.VIPN,&data.PN,&data.integral);                         data.time =0; data.CN =0;                         insertNodeByHead(list,data);                         break;                  case 2:                         printf("--------浏览会员信息---------\n");                         printflist(list);                         break;                  case 3:                         printf("--------删除会员信息---------\n");                         printf("请输入删除的会员号;");                         fflush(stdout);                         rewind(stdin);                         scanf("%d",&data.VIPN) ;                         deleteAppoinNode(list,data.VIPN);                         break;                  case 4:                         printf("--------添加上网信息---------\n");                         printf("请输入会员号:");                         fflush(stdout);                         rewind(stdin);                         scanf("%d",&data.VIPN);                         searchID = searchInfoByData(list, data.VIPN);                         if(searchID != NULL){                             printf("请输入上机时间，机子编号:");                             fflush(stdout);                             rewind(stdin);                             scanf("%d%d",&data.time,&data.CN);                             searchID->data.time = data.time;                             searchID->data.CN   = data.CN;                         }else                             printf("未找到相关信息！\n");                         break;                  case 5:                         printf("--------删除上网信息---------\n");                         printf("请输入会员号:");                         fflush(stdout);                         rewind(stdin);                         scanf("%d",&data.VIPN);                         searchID = searchInfoByData(list, data.VIPN);                         if(searchID != NULL){                             searchID->data.time = 0;                             searchID->data.CN   = 0;                             printf("%d号会员上网信息删除成功！",data.VIPN);                         }else                             printf("未找到会员号为：%d的相关信息！\n",data.VIPN);                         break;                  case 6:                         printf("--------查找会员信息---------\n");                         printf("请输入要查找的会员号:");                         fflush(stdout);                         rewind(stdin);                         scanf("%d", &data.VIPN);                         searchID =  searchInfoByData(list, data.VIPN);                         if (searchID == NULL)                                                   {                               printf("未找到相关信息！\n");                            }                         else                            {                               printf("会员姓名\t\t身份证号码\t\t会员号\t\t电话号码\t\t"                                                       "会员积分\t\t上机时间\t\t机子编号\n");                               printf("%-20s\t%-18d\t%-18d\t%-18d\t%-12d\t%-12d\t%-12d\n",                                      searchID->data.name,searchID->data.idN,searchID->data.VIPN,                                      searchID->data.PN,searchID->data.integral,searchID->data.time,                                      searchID->data.CN);                            }                         break;                  case 0:                         printf("正常退出！\n");                         writeInfoToFile(list,"1.txt");                         exit(0);                         break;                  default :                         printf("选择错误，重新输入\n");                         break;     }     //writeInfoToFile(list, "1.txt"); }   int main(int argc, char *argv[]) {     system("title 网吧管理系统");//设置cmd窗口标题     system("mode con cols=200 lines=50");//窗口宽度高度      readInfoFromFile(list, "1.txt");     while(1)      {         menu();         keyDown();         system("pause");         system("cls");      }     return 0; }

user: user-0
content: 引用 3 楼 往事如烟0819 的回复:代码实现了什么功能，发生了什么问题，也不说。 这么多代码，哪有那么多时间看呀。 咋看呀 我的问题，现在已经解决了 ，谢谢大家

user: user-0
content: 快来人啊！！！！

user: user-3
content: 引用 3 楼 往事如烟0819 的回复:代码实现了什么功能，发生了什么问题，也不说。 这么多代码，哪有那么多时间看呀。 咋看呀 正解。。

user: user-4
content: 代码实现了什么功能，发生了什么问题，也不说。 这么多代码，哪有那么多时间看呀。 咋看呀