16,551
社区成员
发帖
与我相关
我的任务
分享CFileFind finder;
BOOL bWorking = finder.FindFile(_T("*.*"));
while (bWorking)
{
bWorking = finder.FindNextFile();
TRACE(_T("%s\n"), (LPCTSTR)finder.GetFileName());
} while (bRes)
{
bRes = ff.FindNextFile();
// if (bRes != 0)
{
if(ff.IsDirectory()&& !ff.IsDots())
{
CString path = ff.GetFilePath();
TraverseDir(path,vec);
}
else if (!ff.IsDirectory() && !ff.IsDots())
{
CString name=ff.GetFileName();
CString path = ff.GetFilePath();
vec.push_back(path);
}
}