首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

急FindFile返回值为什么总是1?解决办法

2012-01-12 
急!!FindFile返回值为什么总是1?CFileFindfinderBOOLnoEmptyfinder.FindFile( C:\DocumentsandSettings

急!!FindFile返回值为什么总是1?
CFileFind   finder;
BOOL   noEmpty   =   finder.FindFile( "C:\Documents   and   Settings\Administrator\My   Documents\*.* ");

不管Documents文件夹是否为空,返回值都是1?

[解决办法]

CFileFind finder;
BOOL noEmpty = finder.FindFile( "C:\\Documents and Settings\\Administrator\\My Documents\\*.* ");
[解决办法]
除根目录之外,只要是文件夹,至少会搜索到 '. '和 '.. '二个目录

热点排行