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

正文內(nèi)容

操作體統(tǒng)課程設(shè)計(jì)模擬二級(jí)文件管理系統(tǒng)c(編輯修改稿)

2024-12-22 16:04 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 cur=head。 while(curnext!=NULL) { cur=curnext。 } } memset(path,0,sizeof(path))。 strcpy(path,user[i].name)。 path[strlen(user[i].name)]=39。/39。 cout登陸成功 endl。 sum=0。 return 1。 } else { cout密碼錯(cuò)誤!還有 m次登陸機(jī)會(huì) endl。 } } } } cout用戶名不存在!還有 n次登陸機(jī)會(huì) endl。 } exit(0)。 } void initfcb() { head=new FileControlBlocks。 headfront=NULL。 headnext=NULL。 headparent=NULL。 headchild=NULL。 headfstyle=39。\039。 memset(headfilename,0,sizeof(headfilename))。 headfilename[0]=39。/39。 headfstyle=0。 //類型 ,文件或者文件夾 headaddr=0。 headsize=0。 //文件大小 headpriority=0。 memset(headctime,0,sizeof(headctime))。 cur=head。 } int isexist() { FileControlBlocks *p=head。 while(pnext!=NULL) { p=pnext。 //coutpfilenamenameendl。 if(strcmp(pfilename,name)==0) { return 1。 } } return 0。 } void createFile() { toAbsolutePath()。 if(isexist()) { cout文件已存在! endl。 return 。 } int size。 int addr。 cout文件大小(字節(jié)數(shù)): 。 cinsize。 getchar()。 int len。 if(size%512) len=size/512+1。 else len=size/512。 cout需要的塊數(shù) lenendl。 int s=0。 for(int i=0。i256。i++) //分配空間 { s=0。 for(int j=0。j+i256amp。amp。jlen。j++) { if(fileBlock[i+j].used==0) //需求空間內(nèi)有塊已被占用 { s++。 } else { i=j+i。 break。 } } if(s==len) //成功找到足夠空間時(shí) s 的值不變 { addr=i。 for(int k=0。ks。k++,i++) { fileBlock[i].used=1。 } break。 } } if(slen) { cout找不到足夠的存儲(chǔ)空間!文件創(chuàng)建失?。?endl。 return 。 } for(int i=addr。ilen+addr。i++) { memset(fileBlock[i].content,0,sizeof(fileBlock[i].content))。 } FileControlBlocks *fcb=new FileControlBlocks。 strcpy(fcbfilename,name)。 fcbaddr=addr。 fcbsize=size。 fcbfstyle=0。 time_t t = time(0)。 strftime( fcbctime, sizeof(fcbctime), %Y/%m/%d,localtime(amp。t))。 curnext=fcb。 fcbfront=cur。 fcbparent=NULL。 fcbchild=NULL。 fcbnext=NULL。 cur=fcb。 sum+=size。 if(headparent!=NULL) { headparentsize+=size。 } else { headsize+=size。 } int i=curaddr。 cout文件創(chuàng)建成功 ! 其塊號(hào)是: iendl。 } void mkdir() { toAbsolutePath()。 if(isexist()) { cout文件或文件夾已經(jīng)存在 endl。 return 。 } FileControlBlocks *fcb=new FileControlBlocks。 strcpy(fcbfilename,name)。 fcbaddr=0。 fcbsize=0。 fcbfstyle=1。 time_t t = time(0)。 strftime( fcbctime, sizeof(fcbctime), %Y/%m/%d,localtime(amp。t))。 curnext=fcb。 fcbfront=cur。 fcbparent=NULL。 fcbchild=NULL。 fcbnext=NULL。 cur=fcb。 FileControlBlocks *fcb1=new FileControlBlocks。 strcpy(fcb1filename,name)。 fcb1addr=0。 fcb1size=0。 fcb1fstyle=0。 //time_t t = time(0)。 strftime( fcb1ctime, sizeof(fcb1ctime), %Y/%m/%d,localtime(amp。t))。 curchild=fcb1。 fcb1front=NULL。 fcb1parent=cur。 fcb1child=NULL。 fcb1next=NULL。 cout文件夾創(chuàng)建成功 !endl。 } void cd() { FileControlBlocks *p=head。 if(!strcmp(name,..)) { if(headparent!=NULL) { head=headparent。 cur=head。 while(headfront!=NULL) { head=headfront。 } while(curnext!=NULL) { cur=curnext。 } path[strlen(path)1]=39。\039。 for(int i=strlen(path)1。i) { if(path[i]==39。/39。) { break。 } path[i]=39。\039。 } return 。 } else { cout已是本用戶頂層目錄! endl。 return 。 } } else { toAbsolutePath()。 while(pnext!=NULL) { p=pnext。 if(strcmp(pfilename,name)==0) { head=pchild。 cur=head。 strcpy(path,name)。 path[strlen(path)]=39。/39。 while(curnext!=NULL) { cur=curnext。 } break。 } } } } void dir() { char *l[]={文件 ,目錄 }。 FileControlBlocks *p=cur。 //int sum=0,used=0。 while(pfront!=NULL) p=pfront。 printf(目錄名 \t 文件名 \t 文件大小 \t 類型 \t 創(chuàng)建時(shí)間 \n)。 while(pnext!=NULL) { p=pnext。 coutpath\t。 toRelativePath(pfilename)。 printf(%s\t%d\t\t%s\t%s\n,name,psize,l[pfstyle],pctime)。 }
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1