0

How to get list of files in directory?

(for classic C++ or C++11)

12th Jan 2018, 2:17 AM
stamb
stamb - avatar
4 Answers
+ 2
you can use dirent. h header file for this purpose. not sure whether it works on windows
12th Jan 2018, 7:23 AM
shobhit
shobhit - avatar
+ 2
Thank you, Shobhit ! Unexpected...
12th Jan 2018, 3:47 PM
stamb
stamb - avatar
+ 1
c++17 now has the filesystem library. http://en.cppreference.com/w/cpp/experimental/fs if you don't want to use the newest version of c++, check out boost filesystem. http://www.boost.org/doc/libs/1_57_0/libs/filesystem/doc/index.htm
12th Jan 2018, 2:41 AM
Cain Eviatar
Cain Eviatar - avatar
+ 1
maybe because i need to do same thing todays and somehow got to know about it.
12th Jan 2018, 4:26 PM
shobhit
shobhit - avatar