The #include
directive is a preprocessor directive that tells the compiler to insert the contents of a file in the source code.
However, the standard only allows the #include
directive to be followed by angle brackets (<filename.h>
) or double
quotes ("filename.h"
).
If the #include
directive contains macro names, the result of their expansion must also follow this rule:
#define HEADER "filename.h"
#include HEADER // Compliant
The behavior is undefined if neither angle brackets nor double quotes follow the #include
directive.