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

正文內容

操作系統(tǒng)課程設計-二級文檔管理系統(tǒng)-資料下載頁

2025-04-07 21:38本頁面
  

【正文】 tDir[i]=0。 } strcpy(currentDir,rootFolder_Dir)。 strcat(currentDir,/)。 strcat(currentDir,username)。 _RootDir *q。 q=(_RootDir *)malloc(sizeof(_RootDir))。 strcpy(q_Dir,currentDir)。 qfatherDir=rootFolder。 rootFolder=q。 /* DIR *dir。 dir=opendir(currentDir)。 if(dir) { strcpy(tempDirOne,currentDir)。 strcat(tempDirOne,/)。 strcat(tempDirOne,)。 strcpy(tempDirTwo,currentDir)。 strcat(tempDirTwo,/)。 strcat(tempDirTwo,)。 FILE *filep。 filep = fopen(tempDirOne,w)。 fclose(filep)。 FILE *fp。 fp = fopen(tempDirTwo,w)。 fclose(fp)。 } */ TraverseFolder(currentDir)。 }}int login(){ int loginSuccess=0。 int i。 int userExist=0。 char userName[20],userPwd[20]。 char c。 int isEq。 setbuf(stdin,NULL)。//清空緩存 printf(Please input user Name: )。 for(i=0。i20,c=getchar()。i++) { if(c==39。\n39。) { userName[i]=0。 break。 } else { userName[i]=c。 } } _UserMess *userp。 userp=firstUser。 while(userpnextUser != NULL) { if(strcmp(userp_UserName,userName)==0) { userExist=1。 break。 } userp = userpnextUser。 } if(userExist==0) { printf(\n user not exist!please registe!\n)。 return。 } else if(userExist==1) { setbuf(stdin,NULL)。 printf(Please input user password:)。 for(i=0。i20,c=getchar()。i++) { if(c==39。\n39。) { userPwd[i]=0。 //Important break。 } else { userPwd[i]=c。 } } isEq =strcmp(userp_UserPwd,userPwd)。 if(isEq == 0) { printf(\nlogin success!\n)。 loginSuccess=1。 strcpy(_user,userName)。 for(i=0。i255。i++) { currentDir[i]=0。 } strcpy(currentDir,rootFolder_Dir)。 strcat(currentDir,/)。 strcat(currentDir,userName)。 _RootDir *q。 q=(_RootDir *)malloc(sizeof(_RootDir))。 strcpy(q_Dir,currentDir)。 qfatherDir=rootFolder。 rootFolder=q。 } else { printf(password error!\n)。 return 0。 } } TraverseFolder(currentDir)。 return loginSuccess。}void init(){ rootFolder=(_RootDir *)malloc(sizeof(_RootDir))。 strcpy(rootFolder_Dir,/home/liuhao/myfiles/os)。 rootFolderfatherDir=NULL。 firstUser =(_UserMess *)malloc(sizeof(_UserMess))。 firstUsernextUser = NULL。 TraverseFolder(rootFolder_Dir)。}int ReadUserMess(){ int i,j,k,userCount。 i=j=k=userCount=0。 char userID[20]。 char userPwd[20]。 char ch。 FILE *fp。 fp = fopen(,a)。 if(fp==NULL) { printf(System has no Users!please Regist.\n)。 } else { _UserMess *p,*q。 p=firstUser。 pnextUser=NULL。 FILE *filep。 filep = fopen(,r)。 ch = fgetc(filep)。 while(ch!=EOF) { if(ch==39。 39。amp。amp。 j==0) { strcpy(p_UserName,userID)。 j=1。 } else if(ch==39。 39。 amp。amp。 j==1) { strcpy(p_UserPwd,userPwd)。 j=0。 i=0。 k=0。 q=(_UserMess *)malloc(sizeof(_UserMess))。 qnextUser=NULL。 pnextUser =q。 p=q。 userCount++。 } else if(ch != 39。 39。 amp。amp。 j == 0) { userID[i]=ch。 i++。 } else if(ch!= 39。 39。 amp。amp。 j ==1) { userPwd[k] = ch。 k++。 } ch = fgetc(filep)。 } fclose(filep)。 } return userCount。 }六、總結在設計的過程中,我查詢了不少相關資料,不斷地發(fā)現(xiàn)問題、提出問題、解決問題。用C做程序開發(fā)語言,讓我重新認識了C的基礎,在新語言不斷出現(xiàn)并發(fā)展迅速的今天,重新體會到C的基礎性、重要性,以及面對過程,面對函數(shù)式的編程方式。在對自己所編寫的源程序段的糾錯的過程中,使我更好的理解了操作系統(tǒng)中文件系統(tǒng)的理論知識,同時在編程時用到了模塊化的設計思想,這種編程方法可以使我們的編程更簡單,可以使我們的查錯與糾錯變得更加方便。通過這次課程設計使我懂得了理論與實際相結合是很重要的,只有理論知識是遠遠不夠的,只有把所學的理論知識與實踐相結合起來,從理論中得出結論,才能真正為社會服務,從而提高自己的實際動手能力和獨立思考的能力。在設計的過程中遇到問題,這畢竟獨立做的,難免會遇到過各種各樣的問題,同時在設計的過程中發(fā)現(xiàn)了自己的不足之處,對以前所學過的知識理解得不夠深刻,掌握得不夠牢固,比如說結構體……通過這次課程設計之后,一定把以前所學過的知識重新溫故。總的來說通過這次的設計學習使我學到了很多在平時的學習中學不到的很多東西,對操作系統(tǒng)有了更深一層的了解,同時也提高了C語言的能力,由于時間以及個人知識的問題,因此有很多的地方還需要改進。在以后的學習中還要更加
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1