{
int flag;
dirNode *p
q=new dirNode;
strcpy(q
q
q
q
q
q
p=workDir
if(p==NULL){
workDir
cout<< } else{ flag=0; while(p){ if(p->type==1){ if(!strcmp(p->name,fileName)){ flag=1; cout<<"錯誤,\""< } } p=p->next; } if(flag==0){ p=workDir->sub; while(p->next){ p=p->next; } p->next=q; cout<<"\""< } } } //3 刪除文件 void DEL(char fileName[]) { dirNode *p,*q; int flag=0; p=workDir->sub; [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
From:http://tw.wingwit.com/Article/program/czxt/201311/11259.html