dirent.h问题识别但不编译我的代码 [英] dirent.h problem Recognizes but does not compile my code

查看:84
本文介绍了dirent.h问题识别但不编译我的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编辑dirent.h库我得到intellisense像:DIR,opendir

但是当我编译这段代码时我出现了问题

查看我的屏幕:

点击我的屏幕

i edit the dirent.h Library i get the intellisense like :"DIR","opendir"
but when i compile this code I have a problem appears
see my screen :
click my screen

推荐答案

您永远不会声明符号 dir 。这条消息怎么可能不清楚?声明变量或类型成员。如果您已经具有相同名称的变量或成员的声明并且仍然存在此错误,则表示它是在您尝试使用此对象的内容中不可见的范围内完成的。 C ++范围和可见性规则非常简单,您可以立即学习它们。请做,否则你几乎不能走远。



请问,这个问题需要纯文本信息:一些代码示例+错误信息。以正确格式的文本形式在您的问题中提供此信息是否如此困难?毕竟,你有一个剪贴板。屏幕截图非常不方便。



-SA
You never declare the symbol dir. How can this message be unclear? Declare the variable or a type member. If you already have the declaration of the variable or member under the same name and still have this error, it means it is done in the scope not visible in the content you are trying to use this object. C++ scope and visibility rules are extremely simple, you can learn them in no time. Please do, otherwise you hardly can go far.

And please, this question requires pure textual information: some code sample + error information. Was it so difficult to provide this information in your question in the form of properly formatted text? After all, you have a clipboard. A screenshot is extremely inconvenient.

—SA


请注意 opendir 是一个 Linux 函数(参见 opendir手册页 [ ^ ])。请查看此Stack Overflow问题以获取建议:Microsoft Visual Studio:opendir()和readdir(),怎么样? [ ^ ]。
Please note opendir is a Linux function (see opendir man page[^]). Look at this Stack Overflow question for suggestions: "Microsoft Visual Studio: opendir() and readdir(), how?"[^].


这篇关于dirent.h问题识别但不编译我的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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