< dirent.h>在visual studio 2010或2008 [英] <dirent.h> in visual studio 2010 or 2008

查看:223
本文介绍了< dirent.h>在visual studio 2010或2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的代码中使用#include< dirent.h> ,但会发生此错误:

I want to use #include<dirent.h> in my code but this error happen:


无法打开包含文件:'dirent.h':没有此类文件或目录

Cannot open include file: 'dirent.h': No such file or directory

这个问题?

推荐答案

因为这个头文件不附带MSVC。因此找不到它!

Because this header file doesn't come with MSVC. Hence it cannot find it!

它附带 C POSIX库维基百科说,


dirent.h已知包含在
以下编译器中:

dirent.h is known to be included in the following compilers:


  • Turbo C ++(DOS)

  • GCC(跨平台)

  • MinGW(Microsoft Windows)

  • Borland C ++ Builder >
  • Turbo C++ (DOS)
  • GCC (Cross-platform)
  • MinGW (Microsoft Windows)
  • Borland C++ Builder (Microsoft Windows)

Microsoft Visual C ++不包括
dirent.h

Microsoft Visual C++ does not include dirent.h

但是,您可以下载 免费的Windows实现dirent.h 您可以使用Microsoft Visual Studio。

However, you can download free Windows implementation of dirent.h which you can use with Microsoft Visual Studio.

这篇关于&lt; dirent.h&gt;在visual studio 2010或2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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