if(p==NULL){
cout<< } else{ while(p){ if(p->type==1){ if(!strcmp(p->name,fileName)){ flag=1; break; } } p=p->next; } if(flag==1){ if(p==workDir->sub){ workDir->sub=p->next; } else{ q=workDir->sub; while(q->next!=p){ q=q->next; } q->next=p->next; delete p; } cout<<"\""< } else{ cout<<"錯誤,\""< } } } //4 顯示所有目錄 //顯示本目錄下所有兄弟目錄和文件 void dir(dirNode *p) { while(p){ if(p->type==0){ cout.setf(2); [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
From:http://tw.wingwit.com/Article/program/czxt/201311/11260.html