“使用”的缺点是什么;“雨伞”;C项目中的标题?
我在一个C项目中看到了一个有趣的模式:他们在组件内部的任何地方都使用了伞形标题(包含组件中的所有内容的标题) h:“使用”的缺点是什么;“雨伞”;C项目中的标题?,c,include,C,Include,我在一个C项目中看到了一个有趣的模式:他们在组件内部的任何地方都使用了伞形标题(包含组件中的所有内容的标题) h: #include "component_file1.h" #include "component_file2.h" /* #include each and every header of the component */ 组件_文件1.h: #include "umbrella.h" /*include guard and header*/ 组件文件1.c: #includ
#include "component_file1.h"
#include "component_file2.h"
/* #include each and every header of the component */
组件_文件1.h:
#include "umbrella.h"
/*include guard and header*/
组件文件1.c:
#include "umbrella.h"
/*c code*/
其他文件中的模式相同。我得到的解释是: