The three ways to #include

#include in C is used to include other files, be it header files or source files (useful for example when generating code when you have small sections of code that are architecture dependent, or as an alternative to templates found in C++).

To include a file named “file.h”, you either write #include "file.h" or #include <file.h>. Unfortunately it's rather common the see the wrong one used. #include <file.h> is used to include an installed header file, such as one in /usr/include, whereas #include "file.h" is used for files within the code base, these are name relative to the file it is included from (not the file it is included to), but the compiler also lets the user specify additional directories to search from. Although extremely uncommon, absolute file paths may also be used.

But there is a third way to use #include, namely to specify the file to include dynamically using a macro. That is, #include FILE can be used to include whichever filename the macro FILE expands to. This can be used to deal with platform and implementation differences; letting the user specify at compile-time which file should be used. FILE must (ultimately) expand to a string either a regular double-quote string, to the #include-specific angle-bracket string. Unfortunately, string concatenation is not supported, although you will probably never need that.