How do I get a list of files in a directory in C++?

后端 未结 13 1443
南旧
南旧 2020-11-28 23:36

How do you get a list of files within a directory so each can be processed?

13条回答
  •  一整个雨季
    2020-11-28 23:57

    Or you do this and then read out the test.txt:

    #include 
    
    int main() {    
    system("dir /b > test.txt");
    }
    

    The "/b" means just filenames are returned, no further info.

提交回复
热议问题