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

正文內(nèi)容

用mysql數(shù)據(jù)庫實現(xiàn)的c圖書管理系統(tǒng)-在線瀏覽

2025-07-16 19:39本頁面
  

【正文】 *********************************/ class Admin//管理員 { public: string adm_name。//密碼 public: Admin() { adm_name=adm。 } }。 int count。 time_t back_time。} }。 string stu_phone。//學(xué)號(登錄帳號) string password。//欠費額 LendBook lendbook。//把此人所有信息(包括借書)顯示出來 }。 cout聯(lián)系電話: stu_phoneendl。 cout欠費額 :debtendl。 } class StuNode { public: Stu stu。 }。 void savestu(StuNode *p)。//將讀者信息從數(shù)據(jù)庫中刪除 class StuManage:public BookManage { private: int totolstu。} void addstu()。//刪除用戶 void findstu(string s,int flag)。//借書 void backbook(string ss,string s,int flag)。//還款 void mux_stu_book()。 void StuManage::addstu() { string h。 cinh。 else if(h==0) while(1) { if(h==1)break。 StuNode *p=new StuNode。 cinna。 cout請輸入聯(lián)系電話: endl。 p=p1。 cinnum。 p=0。 while(1) { cout請輸入六位密碼: endl。 cout請確認六位密碼: endl。 if(pa1==pa2) { pa=pa2。 break。 } p=0。 headstu=p。//保存至數(shù)據(jù)庫 (StuManage::totolstu)++。 cinh。 } else coutYELLOW輸入字符無效! NONEendl。 if(headstu!=NULL) { switch(flag) { case 0: if(headstu==s)//當要刪除的用戶位于鏈表的頭結(jié)點位置 { headstu=pnext。 del_sql_stu(p)。 } else if(pnext)//非頭結(jié)點位置 { for(p=headstu。amp。p=pnext) { if(pnext==s) { pnext=pnextnext。 del_sql_stu(pnext)。 break。 } break。 totolstu。//從數(shù)據(jù)庫中刪除 delete p。pnext!=NULLamp。p!=NULL。 totolstu。//從數(shù)據(jù)庫中刪除 //delete pnext。 } } if(pnext==NULL) coutYELLOW此用戶不存在! NONEendl。 default: coutYELLOW輸入數(shù)字無效! NONEendl。 } } } void StuManage::findstu(string s,int flag) { StuNode *p。 switch(flag) { case 0: for(p=headstu。p=pnext) { if(p==s) break。 for(p=headstu。p=pnext) { 13 if(p==s) h++。 for(p=headstu。p=pnext) { if(p==s) { p()。 int i=p。//輸出用戶所借書的名字 while(i) { cout\t( m++):p[i1]endl。 } coutendl。 if(i0) cout所借書的名字為: endl。i。 cout您還可以借 3p本書 !endl。 } } } break。p!=NULL。 if(p=3) { coutYELLOWsorry,您已借滿 3 本書,不能再借了?。?!NONEendl。 cout所借書的名字為: endl。i。 } else { int i=p。//輸出用戶所借書的名字 while(i) { //輸出用戶所借書的名字 cout\t( m++) :p[i1]endl。 } cout您已借了 p本書! endl。 coutendl。 } } if(p==NULL) coutYELLOW此用戶不存在! NONEendl。 default: coutYELLOW輸入數(shù)字無效! NONEendl。 } } 15 void StuManage::mux_stu_book() { StuNode *p。int i=0,j=0,h=0。p!=NULL。 cout當前圖書館注冊用戶數(shù)為 :iendl。q!=NULL。 j+=q。 cout已借出圖書總數(shù)為 :hjendl。 StuNode *q。q!=NULL。break。return。p!=NULL。//從數(shù)據(jù)庫中刪除 int i=q。amp。} if((i3)amp。(q0)) {coutYELLOW對不起,您因為所借圖書超期已欠費,請速交清16 欠費再借! NONEendl。amp。} } else { //記錄下所借書的名字存入用戶信息中 q[i]=p。 time(amp。 q=time(amp。//保存借書時間 q++。//同樣的書的個數(shù)減一 } break。 break。p!=NULL。//從數(shù)據(jù)庫中刪除 int i=q。amp。} if((i3)amp。(q0)) {coutYELLOW對不起,您因為所借圖書超期已欠費,請速交清欠費再借! NONEendl。amp。} } else { 17 q[i]=p。 time(amp。 q=time(amp。 q++。//同樣的書的個數(shù)減一 } break。 break。break。 savebook(p)。 StuNode *q。q!=NULL。break。return。p!=NULL。//從數(shù)據(jù)庫中刪除 time_t now。now)。now)。 p++。 if(s2592021)//2592021為一個月的秒數(shù) { int t=ceil((s2592021)/86400)。 } break。 break。p!=NULL。//從數(shù)據(jù)庫刪除 time_t now。now)。now)。 p++。 if(s2592021)//2592021為一個月的秒數(shù) { int t=ceil((s2592021)/86400)。 } break。 break。break。 savebook(p)。 for(p=headstu。p=pnext)//查找用戶 { if(p==s) { p=0。break。 } /**************************************** ( 3 ) 數(shù) 據(jù) 保 存 與 下 載*******************************************/ char stu_str[50]。 stream result。 //從 i中抽取前面插入的 string值 return stu_str。 sprintf(strSQL,insert into reader values(%s,%s,%s,%s,%f,%ld,%ld,%d),change_char(p),change_char(pone),change_char(p),change_char(p),p,(long)(p),(long)(p),p)。mysql,strSQL,strlen(strSQL)) != 0) printf(記錄插入失敗 !\n)。 sprintf(strSQL,insert into book values(%s,%s,%s,%s,%d,%d),change_char(p),change_char(p),change_char(p),change_char(p),p,pboo)。mysql,strSQL,strlen(strSQL)) != 0) printf(記錄插入失敗 !\n)。 sprintf(strSQL,delete from reader where stu_name=39。,change_char(p))。mysql,strSQL,strlen(strSQL)) != 0) printf(記錄刪除失敗 !\n)。 sprintf(strSQL,delete from book where book_name=39。,change_char(p))。mysql,strSQL,strlen(strSQL)) != 0) printf(記錄刪除失敗 !\n)。 if(!outfile) { cerropen error!endl。 } StuNode *p。p!=NULL。 outfile p p。 outfile p。 outfile p。 } ()。 if(!outfile) { cerropen error!endl。 } BookNode *p。p!=NULL。 outfile p p。 outfile p。 } ()。 memset((void*)strSQL,0,100)。 mysql_query(amp。 //查詢 results = mysql_store_result(amp。 //獲取記錄 num_fields = mysql_num_fields(results)。 //獲取字段數(shù)組 22 while((rows = mysql_fetch_row(results)) != NULL)
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1