devxlogo

Two Distinct #include Directives

Two Distinct #include Directives

The preprocessor #include directive appears in two flavors:

 #include  // angular brackets

and

 #include "myclass.h" // quotes

The two are not interchangeable. The angular-bracket version applies to standard header files.

The quoted version applies to all the rest: user’s header files or implementation dependent ones (like “winsock.h”). The quoted version may contain the full path name. Otherwise, the current directory is assumed.

devx-admin

Share the Post: