IsDirectory()使用求解
void compare()
{
recurse("Data//Format");
}
void recurse(LPCTSTR pstr)
{
int i = 1;
CFileFind finder;
string strWildcard(pstr);
strWildcard.append("//*.*");
BOOL bWorking = finder.FindFile(strWildcard.c_str());
::OutputDebugString("AAAAA");
while (bWorking)
{
bWorking = finder.FindNextFile();
if (finder.IsDots())
{
::OutputDebugString("QQQQQQ");
continue;
}
cout<<(LPCTSTR)finder.GetFileName()<<endl;
if (finder.IsDirectory())
{
cout<<"========================"<<endl;
}
}
finder.Close();
}
/***********************************************/
请问各位为什么在Release模式下到if(finder.IsDirectory())就不能运行了?
Debug模式没有问题
是setting的问题吗?求教,坐等。
[解决办法]
recurse("Data//Format");
先改用 绝对路径 试试
// 建议改为 \\