我将一个路径存放在一个字符串里,如何根据这个字符串选出它下面的文件!
解决方案 »
- 自绘曲线--放大,移动疑-问
- 关于lod算法的复杂度问题
- 请教:关于包含TCP数据的IP数据报重组的实现
- 如何将dll加到自己的工程中,产生一个exe文件?
- 我的登陆界面
- 请问哪里有<windows 核心编程>的光盘下载?
- ActiveX安装问题
- 《Art of Computer Programming》即将登录!本站7.8折全面预订中文版、英文版、精装本
- 在对话框的成员函数中怎么引用mainframe中的成员变量?(
- 程序退出时,dll不能进入ExitInstance
- 请教,在SQL SERVER中用那个函数可将一个文本型数据转换为如:2002-08-02 18:25的格式.
- 如何调试dll?
#include <iostream>using namespace std;void Recurse(LPCTSTR pstr)
{
CFileFind finder; // build a string with wildcards
CString strWildcard(pstr);
strWildcard += _T("\\*.*"); // start working for files
BOOL bWorking = finder.FindFile(strWildcard); while (bWorking)
{
bWorking = finder.FindNextFile(); // skip . and .. files; otherwise, we'd
// recur infinitely! if (finder.IsDots())
continue; // if it's a directory, recursively search it if (finder.IsDirectory())
{
CString str = finder.GetFilePath();
cout << (LPCTSTR) str << endl;
Recurse(str);
}
} finder.Close();
}void main()
{
if (!AfxWinInit(GetModuleHandle(NULL), NULL, GetCommandLine(), 0)
cout << "panic!" << endl;
else
Recurse(_T("C:"));
}