C++Mfc中读出文件夹里面的相关文件

代码段如下

CString strFileTitle;

CFileFind finder;
bool bWorking = finder.FindFile(_T("*.txt"));
while(bWorking)
{
bWorking=finder.FindNextFile();
strFileTitle+=finder.GetFileTitle();
}

AfxMessageBox(strFileTitle);

//文件名都保存在了strFileTitle中,但没有后缀名

猜你喜欢

转载自blog.csdn.net/sndayYU/article/details/46760127