赞
踩
- #include<iostream>
- #include<io.h>
-
- using namespace std;
-
- void main()
- {
- char *filename = "D:\\MyBin\\pic\\*.jpg";
-
- struct _finddata_t fileinfo;
- long handle;
- handle = _findfirst(filename,&fileinfo);
- if(handle == -1) cout<<"fail..."<<endl;
- else
- cout<<fileinfo.name<<endl;
- while(!_findnext(handle,&fileinfo))
- {
- cout<<fileinfo.name<<endl;
- }
- _findclose(handle);
- system("pause");
- }
结果如图
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。