2.1. Include Syntax
2.1 Include Syntax
Both user and system header files are included using the preprocessing directive ‘#include
’. It has two variants:
-
#include <
file>
- 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 (see Invocation). -
#include "
file"
- 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 quote directories and then the same directories used for
<
file>
. You can prepend directories to the list of quote directories with the-iquote
登录查看完整内容