LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-27-2010, 01:39 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
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).
 
Old 12-27-2010, 01:48 PM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
directory list ygloo Linux - General 8 09-13-2006 05:59 AM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
cannot list directory contents kpachopoulos Linux - General 2 11-29-2005 05:24 PM
How to list all the files in a directory Linh Programming 2 05-11-2004 10:09 AM
directory list jpostma Linux - General 1 10-23-2003 06:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration