How can I get the list of files in a directory using C or C++?

前端 未结 27 3276
情书的邮戳
情书的邮戳 2020-11-21 05:30

How can I determine the list of files in a directory from inside my C or C++ code?

I\'m not allowed to execute the ls command and parse the results from

27条回答
  •  花落未央
    2020-11-21 06:17

    Try boost for x-platform method

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

    or just use your OS specific file stuff.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题