best-practice on C header files with #ifndef #define #endif

后端 未结 5 2167
误落风尘
误落风尘 2020-12-09 18:25

what is concerned best practice regarding the following \"pattern\"?

#ifndef BLAFOO_H
#define BLAFOO_H
/* ...
 * ...
 */
#endif /* BLAFOO_H */
5条回答
  •  离开以前
    2020-12-09 19:14

    It doesn't really matter as long as it's not likely to be used anywhere else. I usually go with something like BLAFOO_H_INCLUDED.

提交回复
热议问题