freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

軟件工程課程設計-城市公交查詢系統(tǒng)課程設計說明書-資料下載頁

2024-08-23 11:28本頁面
  

【正文】 lse{ if(!strcmp(password1,xloginPassword)){ printf(\n不能與原密碼相同!請重新輸入密碼:)。 }else{ printf(\n請再次輸入密碼:)。 fflush(stdin)。 //gets(password)。 Inputpw(password2,20)。 if(!strcmp(password1,password2)){ break。 }else{ printf(\n兩次輸入的密碼不一致!請重新輸入密碼:)。 } } } } fp = fopen(,r)。 if(fp){ //將用戶數(shù)據(jù)讀出存入鏈表進行操作 while(!feof(fp)){ q = (struct user*)malloc(sizeof(struct user))。 qnext = NULL。 fscanf(fp, %d %d %s %s,amp。qidentity,amp。quserId,qloginName,qloginPassword)。 //printf(%d %d %s %s,qidentity,quserId,qloginName,qloginPassword)。 qnext = headnext。 headnext = q。 } q = headnext。 //遍歷鏈表,找到屬于本用戶的結點,對數(shù)據(jù)進行修改 while(q != NULL){ if((!strcmp(xloginName,qloginName)) amp。amp。 !(strcmp(xloginPassword,qloginPassword))){ mark = true。 strcpy(qloginPassword,password1)。 system(cls)。 printf(修改密碼成功!)。 system(pause)。 break。 } q = qnext。 } fp = fopen(,w)。 //更新用戶數(shù)據(jù)信息 if(fp){ p = headnext。 while(p != NULL){ fprintf(fp, %d %d %s %s,pidentity,puserId,ploginName,ploginPassword)。 x = p。 p = pnext。 if(x != q) free(x)。 //釋放鏈表結點,節(jié)省內存 } fclose(fp)。 }else{ //意外處理 printf(文件39。39。打開失??!)。 system(pause)。 return NULL。 } if(mark){ return q。 }else{ system(cls)。 printf(修改密碼成功!)。 system(pause)。 return NULL。 } }else{ printf(文件39。39。打開失??!)。 system(pause)。 exit(1)。 } system(pause)。}struct user*Register(){ //printf(注冊中)。 system(cls)。 printf(\n用戶注冊頁面\n\n\n\n\n)。 struct user *p,*q,*x。 struct user *head。 bool mark。 char password[20]。 FILE *fp。 int userId = 0。 head = (struct user*)malloc(sizeof(struct user))。 //建頭結點,將用戶數(shù)據(jù)全部取出存入到鏈表中,便于操作 headnext = NULL。 fp = fopen(,r)。 if(fp){ while(!feof(fp)){ if(userId == 0){ //頭結點存設定好的管理員信息 fscanf(fp, %d %d %s %s,amp。headidentity,amp。headuserId,headloginName,headloginPassword)。 headidentity = 1。 strcpy(headloginName,admin)。 strcpy(headloginPassword,adminadmin)。 headuserId = 0。 }else{ q = (struct user*)malloc(sizeof(struct user))。 qnext = NULL。 fscanf(fp, %d %d %s %s,amp。qidentity,amp。quserId,qloginName,qloginPassword)。 //printf(%d %d %s %s,qidentity,quserId,qloginName,qloginPassword)。 qnext = headnext。 headnext = q。 } userId++。 // 記錄用戶賬號的總數(shù),作為新建用戶的編號 } p = (struct user*)malloc(sizeof(struct user))。 //存儲新用戶信息的結點 printf(請輸入用戶名:)。 while(1){ fflush(stdin)。 gets(ploginName)。 //printf(%s,ploginName)。 q = head。 //用戶名驗證 if(strlen(ploginName) 4){ printf(\n用戶名過短!請重新輸入:)。 continue。 }else if(strlen(ploginName) 40){ printf(\n用戶名過長!請重新輸入:)。 continue。 }else{ while(q != NULL){ mark = false。 if(!strcmp(qloginName,ploginName)){ mark = true。 //標記用戶名已存在 break。 } q = qnext。 } if(mark){ printf(\n用戶名已存在!請重新輸入:)。 }else{ break。 } } } printf(請輸入登錄密碼:)。 //密碼驗證 while(1){ fflush(stdin)。 //gets(ploginPassword)。 Inputpw(ploginPassword,20)。 if(strlen(ploginPassword) 20){ printf(\n密碼過長!請重新輸入密碼:)。 }else if(strlen(ploginPassword) 6){ printf(\n密碼過短!請重新輸入密碼:)。 }else{ printf(\n請再次輸入密碼:)。 fflush(stdin)。 //gets(password)。 Inputpw(password,20)。 if(!strcmp(ploginPassword,password)){ break。 }else{ printf(\n兩次輸入的密碼不一致!請重新輸入密碼:)。 } } } puserId = userId。 //記錄編號 pidentity = 0。 //標志注冊的為普通用戶 pnext = headnext。 headnext = p。 //將新注冊的用戶信息結點插入到用戶信息的鏈表中 fclose(fp)。 //更新記錄用戶數(shù)據(jù)的文件 fp = fopen(,w)。 if(fp){ q = head。 while(q != NULL){ fprintf(fp, %d %d %s %s,qidentity,quserId,qloginName,qloginPassword)。 x = q。 q = qnext。 if(x != p) free(x)。 //釋放鏈表結點,節(jié)省內存 } fclose(fp)。 }else{ //意外處理 printf(文件39。39。打開失??!)。 system(pause)。 return NULL。 } }else{ //意外處理 printf(文件39。39。打開失??!)。 system(pause)。 return NULL。 } return p。}void Inputpw(char *password,int len) { int i=0。 char ch。 fflush(stdin)。 //清洗流,以防妨礙密碼正確輸入 for ( ch = getch()。 ch!=13。ch = getch() ) //若用戶輸入回車則結束密碼輸入 { if (i=len) continue。 //如果已到達len指定的長度 if ( ch == 39。\b39。 ) //若用戶按了退格鍵 { if ( i 0 ) //如果已顯示星數(shù)不為0 { printf(\b)。 //退一個格 password[i]=39。\039。 //password[i1]的值改為39。\039。, 已顯示星數(shù)減一,數(shù)組索引值減一 } putchar(0)。 //顯示空字符 printf(\b)。 //退一個格 continue 。 } if(!isgraph(ch)) continue。 //密碼只能為ASCII碼值為32127的字符 printf(*)。 //上述情況都不是則顯示一個星 password[i++]=ch。 //將ch賦給password[i],已顯示星數(shù)加一,數(shù)組索引值加一 } password[i] = 39。\039。 //設置結尾的空字符}struct user*FindPassword(){ system(cls)。 printf(\n請致電18374889338!)。 system(pause)。 return NULL。}struct user *Logout(struct user *p){ system(cls)。 printf(\n\n\n\n\n\n\t\t\t\t注銷中?。?!\n\n\n)。 free(p)。 system(pause)。 return NULL。}void LineManage(){ char option。 while(1){ system(cls)。 printf(\n線路管理頁面\n\n\n\n\n)。 printf(\n\t\\\n)。 printf(\n\t\\\n\n)。 printf(\n\n\n\n\t請輸入你要進行的操作:)。 while(1){ fflush(stdin)。 //刷新輸入流 option = getch()。 printf(%c\n,option)。 if(option 49 || option 52){ //做輸入檢測,防惡意操作 printf(\t輸入有誤!請重新輸入:)。
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1