写个查找文件的C++程序
#include <iostream>using namespace std;
#include "find.h"
int main()
{
int j=1;char del[128]={0};
cout<<"请输入要查找的文件名:";
cin>>name;
find(name);
for(;j<count;j++)
cout<<endl<<"("<<j<<")----"<<pathdata[j];
re:if(c)
{
cout<<endl<<"按<-1>结束,按<序号>删除该文件, 按<0>删除所有文件:";
cin>>j;if(j==-1)goto re2;
if(!j)goto re1;
sprintf(del,"%s \"%s\"","del",pathdata[j]);
system(del);c--;
cout<<"已经删除完毕。"<<endl;
goto re;
}
getch();re2:
return 0;
re1:
{
j++;
sprintf(del,"%s %s","del",pathdata[j]);
system(del);c--;
if(c)goto re1;
cout<<endl<<"已经全部删除完毕。"<<endl;
}
return 1;
}