Listing all the files in a directory...

Discussion in 'C++' started by Piyush, Aug 2, 2004.

  1. Piyush

    Piyush Guest

    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
     
    Piyush, Aug 2, 2004
    #1
    1. Advertising

  2. Piyush

    Sharad Kala Guest

    "Piyush" <> wrote in message
    news:...
    > 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
     
    Sharad Kala, Aug 2, 2004
    #2
    1. Advertising

  3. On 2 Aug 2004 00:17:09 -0700, Piyush <> 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
     
    John Harrison, Aug 2, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    495
    Oscar kind
    Mar 9, 2005
  2. Jennica Humphrey
    Replies:
    7
    Views:
    3,529
    Evan Carew
    Jan 29, 2004
  3. David Jacques

    listing files in a directory

    David Jacques, Nov 8, 2004, in forum: C++
    Replies:
    2
    Views:
    486
    Evan Carew
    Nov 8, 2004
  4. Replies:
    4
    Views:
    4,445
    Real Gagnon
    Jan 25, 2007
  5. David Jacques

    listing all files in a directory

    David Jacques, Nov 8, 2004, in forum: C Programming
    Replies:
    3
    Views:
    417
    SM Ryan
    Nov 8, 2004
Loading...

Share This Page