List all files in the directory

Hi
I just want to list all files in specific directory
when i tried this one http://www.cplusplus.com/forum/beginner/9173/
i faced error in dirent.h, when i download it i faced another error in the code!!

any suggestions!!
http://en.wikipedia.org/wiki/Dirent.h
It's a UNIX header unavailable for Windows. It's not enough to just have the header itself. You need a system that provides the functions it declares.
You could try compiling the code through Cygwin.

EDIT: Alternatively, you could try Boost::Filesystem.
Last edited on
More on dirent.h (working examples):
http://www.cplusplus.com/forum/unices/12452/
http://www.cplusplus.com/forum/unices/3548/#msg15009

If your compiler came with the dirent.h header, you should be able to use the functions...

I also recommend you to Boost::Filesystem.
Topic archived. No new replies allowed.