能源管控程序
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 年前
123456789101112131415161718192021222324252627282930313233343536373839
  1. This directory is intended for project header files.
  2. A header file is a file containing C declarations and macro definitions
  3. to be shared between several project source files. You request the use of a
  4. header file in your project source file (C, C++, etc) located in `src` folder
  5. by including it, with the C preprocessing directive `#include'.
  6. ```src/main.c
  7. #include "header.h"
  8. int main (void)
  9. {
  10. ...
  11. }
  12. ```
  13. Including a header file produces the same results as copying the header file
  14. into each source file that needs it. Such copying would be time-consuming
  15. and error-prone. With a header file, the related declarations appear
  16. in only one place. If they need to be changed, they can be changed in one
  17. place, and programs that include the header file will automatically use the
  18. new version when next recompiled. The header file eliminates the labor of
  19. finding and changing all the copies as well as the risk that a failure to
  20. find one copy will result in inconsistencies within a program.
  21. In C, the usual convention is to give header files names that end with `.h'.
  22. It is most portable to use only letters, digits, dashes, and underscores in
  23. header file names, and at most one dot.
  24. Read more about using header files in official GCC documentation:
  25. * Include Syntax
  26. * Include Operation
  27. * Once-Only Headers
  28. * Computed Includes
  29. https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html