LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C++ List Directory (https://www.linuxquestions.org/questions/programming-9/c-list-directory-852652/)

MTK358 12-27-2010 01:39 PM

C++ List Directory
 
How to get the contents of a directory in C++?

I know about opendir(), but I wonder if there is a C++ way (that uses classes and exceptions).

phil.d.g 12-27-2010 01:48 PM

Have a look here http://www.boost.org/doc/libs/1_45_0.../doc/index.htm

And this example: http://www.boost.org/doc/libs/1_45_0.../simple_ls.cpp


Boost (http://www.boost.org) is a vast collection of well written and very useful set of libraries, many of which are earmarked to be included in the next standard of C++. Most of the implementation is in header files, making good use of templates similar to the STL.


All times are GMT -5. The time now is 04:32 AM.