What's compile error : 'isFile' undeclared

I type below,
but I didn't success to compile becuase it had error "isFile" undeclared.
Why not?

#include <dirent.h>

DIR *Dir
struct dirent *DirEntry;

Dir = opendir("/appl/aaa.env");
while(DirEntry = readdir(Dir)){
if(DirEntry->d_type == isFile){
cout << "find a file : " DirEntry->d_name << endl;
}
}

What's problem?
I missed "unsigned char isFile = 0x8;"

keke...
Doing that is not recommended.
Use stat() to learn whether or not a file is a directory.
See http://www.cplusplus.com/forum/beginner/10292/page1.html#msg47965

Hope this helps.
Topic archived. No new replies allowed.