cpp.info: Include Syntax
Go forward to Include Operation
Go up to Header Files
Go to the top op cpp
Both user and system header files are included using the
preprocessing directive `#include'. It has two variants:
This variant is used for system header files. It searches for a
file named FILE in a standard list of system directories. You can
prepend directories to this list with the `-I' option (*note
This variant is used for header files of your own program. It
searches for a file named FILE first in the directory containing
the current file, then in the same directories used for `<FILE>'.
The argument of `#include', whether delimited with quote marks or
angle brackets, behaves like a string constant in that comments are not
recognized, and macro names are not expanded. Thus, `#include <x/*y>'
specifies inclusion of a system header file named `x/*y'.
However, if backslashes occur within FILE, they are considered
ordinary text characters, not escape characters. None of the character
escape sequences appropriate to string constants in C are processed.
Thus, `#include "x\n\\y"' specifies a filename containing three
backslashes. (Some systems interpret `\' as a pathname separator. All
of these also interpret `/' the same way. It is most portable to use
It is an error if there is anything (other than comments) on the line
after the file name.
Created Mon Nov 8 17:42:10 2004 on tillpc with info_to_html version 0.9.6.