c – #include“../somefile.h”中的..是什么意思
发布时间:2020-12-16 10:42:24 所属栏目:百科 来源:网络整理
导读:是否意味着搜索somefile.h的上一个文件夹或somefile.h的项目文件夹? 解决方法 这意味着在父文件夹中查找somefile.h,查找找到include指令的源文件. 在* nix系统中(这个约定来自AFAIK): . manse the current directory... means one level up from the curre
是否意味着搜索somefile.h的上一个文件夹或somefile.h的项目文件夹?
解决方法
这意味着在父文件夹中查找somefile.h,查找找到include指令的源文件.
在* nix系统中(这个约定来自AFAIK): . manse the current directory. .. means one level up from the current directory. 例如,如果您具有以下目录结构: home | code | src | someOtherDirectory 你的源文件可能在home / code / src中,你有: #include "../somefile.h" 在您的源代码中,然后编译器将在home / code /中查找somefile.h (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |