reading directory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Florian Liefers

    reading directory

    "Hello world\n",

    how can get a list of files/directories from a specified directory?
    something like

    FILE *fp=fopen("dire ctory")
    while (...) {
    file=....;
    cout << file << endl;
    }


    Tnx,
    Florian
  • John Harrison

    #2
    Re: reading directory


    "Florian Liefers" <news@isource.d e> wrote in message
    news:c2d05l$h09 $07$1@news.t-online.com...[color=blue]
    > "Hello world\n",
    >
    > how can get a list of files/directories from a specified directory?
    > something like
    >
    > FILE *fp=fopen("dire ctory")
    > while (...) {
    > file=....;
    > cout << file << endl;
    > }
    >
    >
    > Tnx,
    > Florian[/color]

    Standard C++ has no support for directories. You need to ask this question
    again on a group that supports whatever platform you are using.

    Have a look at the comp.lang.c++ welcome page for suggestions


    john


    Comment

    • db

      #3
      Re: reading directory

      On Sat, 06 Mar 2004 18:01:41 +0100
      Florian Liefers <news@isource.d e> wrote:
      [color=blue]
      > "Hello world\n",
      >
      > how can get a list of files/directories from a specified directory?
      > something like
      >
      > FILE *fp=fopen("dire ctory")
      > while (...) {
      > file=....;
      > cout << file << endl;
      > }[/color]



      br
      db

      Comment

      Working...