By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

Listing all the files in a directory...

P: n/a
Hi,
I want to list all the files in a directory using c++ code...as far
as i know there is no standard c++ method of doing this..how should i
go about doing this in linux/windows?
Thanks,
Piyush
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Piyush" <ju***********@yahoo.co.in> wrote in message
news:b7**************************@posting.google.c om...
Hi,
I want to list all the files in a directory using c++ code...as far
as i know there is no standard c++ method of doing this..how should i
go about doing this in linux/windows?


Good you know that there is no standard C++ way of doing it. It would be
better if you ask this question on your platform specific newsgroup.
<OT>
Windows - FindFirstFile, FindNextFile etc
POSIX system - opendir, readdir, closedir etc
</OT>

-Sharad
Jul 22 '05 #2

P: n/a
On 2 Aug 2004 00:17:09 -0700, Piyush <ju***********@yahoo.co.in> wrote:
Hi,
I want to list all the files in a directory using c++ code...as far
as i know there is no standard c++ method of doing this..how should i
go about doing this in linux/windows?
Thanks,
Piyush

As you say no standard method but the following library is fairly portable.

http://www.boost.org/libs/filesystem/doc/index.htm

john
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.