在C ++中列出目录和子目录 [英] listing directories and sub in C++

查看:68
本文介绍了在C ++中列出目录和子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想写一个独立于平台的方法,列出目录中包含的所有文件




我从哪里开始?!


提前致谢

Salvo

Hi,

I''d like to write a platform-indipendent method that lists all the files
contained in a directory.

Where do I start from?!

Thanks in advance
Salvo

推荐答案



salvo写道:

salvo wrote:


我想写一个平台 - 独立的方法,列出目录中包含的所有
文件。
Hi,

I''d like to write a platform-indipendent method that lists all the files contained in a directory.




目录是平台相关的,所以这是不可能的。

问候,

Michiel Salters



Directories are platform-dependent, so this is impossible.
Regards,
Michiel Salters


salvo写道:

<我想写一个独立于平台的方法,列出目录中包含的所有
文件。

我从哪里开始?!

提前致谢
Salvo
Hi,

I''d like to write a platform-indipendent method that lists all the
files contained in a directory.

Where do I start from?!

Thanks in advance
Salvo




请参阅文件系统库 www.boost.org


Jeff



See the filesystem library at www.boost.org.

Jeff


>我想编写一个独立于平台的方法,列出目录中包含的所有
> I''d like to write a platform-indipendent method that lists* all the
文件。




你可以去对于C,键入findfirst()和findnext()函数。我不知道他们是否会与平台无关。


Tarun



You can go for "C" type "findfirst() and findnext() functions. I don''t
know they will be platform independent or not.

Tarun

这篇关于在C ++中列出目录和子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆