位置:IT落伍者 >> java >> 浏览文章
{
int flag;
dirNode *p*q;
q=new dirNode;
strcpy(q>namefileName);
q>sub=NULL;
q>type=;
q>next=NULL;
q>father=workDir;
q>size=fileSize;
p=workDir>sub;
if(p==NULL){
workDir>sub=q;
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]
}
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;
p=p->next;
if(flag==0){
p=workDir->sub;
while(p->next){
p->next=q;
cout<<"\""< }}}//3 删除文件void DEL(char fileName[]){dirNode *p,*q;int flag=0;p=workDir->sub;
//3 删除文件
void DEL(char fileName[])
dirNode *p,*q;
int flag=0;
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
上一篇:十大题型算法全实现——(六)文件管理[7]
下一篇:.NET和Java 之碰撞火花:到底谁快