Node: Header files and header inclusion, Previous: Comment layout, Up: Preprocessor-level specifications
foo.h
, the protection key SHALL be FOO_H_
:
#ifndef FOO_H_ # define FOO_H_ /* ** Contents of foo.h */ #endif /* !FOO_H_ */
#include
) SHOULD appear at the start of the file.
This is bad style:
|
#ifndef FOO_H_ # define FOO_H_ # include <stdio.h> # include "bar.h" int bar(); int foo(); #endif /* !FOO_H_ */ |