Mar*_*lon 3 c++ include c-preprocessor
是否意味着搜索somefile.h的上一个文件夹或somefile.h的项目文件夹?
Ara*_*raK 14
这意味着somefile.h在父文件夹中查找找到include指令的源文件.
在*nix系统中(这个约定来自AFAIK):
. manse the current directory.
.. means one level up from the current directory.
Run Code Online (Sandbox Code Playgroud)
例如,如果您具有以下目录结构:
home
|
code
| src
| someOtherDirectory
Run Code Online (Sandbox Code Playgroud)
你的源文件可能在home/code/src,你有:
#include "../somefile.h"
Run Code Online (Sandbox Code Playgroud)
在你的源代码,那么编译器会寻找somefile.h在home/code/
| 归档时间: |
|
| 查看次数: |
1808 次 |
| 最近记录: |